How to get ON_DimStyle methods in opennurbs 6


(Sandip Ichake) #1

Hello,

Following methods are not available on ON_DimStyle:
LengthFormat, TextAlignment, ArrowType & AlternateLengthFormat.

How to get the data like length format, text alignment etc.

Please advise.

Thanks


(Lowell Walmsley) #3

Here are some functions for that:
All members of ON_DimStyle

LengthFormat & AlternateLengthFormat

ON_DimStyle::LengthDisplay DimensionLengthDisplay() const;
ON_DimStyle::LengthDisplay AlternateDimensionLengthDisplay() const;
void SetDimensionLengthDisplay(ON_DimStyle::LengthDisplay length_display);
void SetAlternateDimensionLengthDisplay(ON_DimStyle::LengthDisplay length_display);

TextAlignment

ON::TextVerticalAlignment TextVerticalAlignment() const;
void SetTextVerticalAlignment(ON::TextVerticalAlignment style);
ON::TextVerticalAlignment LeaderTextVerticalAlignment() const; // was attachstyle
void SetLeaderTextVerticalAlignment(ON::TextVerticalAlignment style);

ON::TextHorizontalAlignment TextHorizontalAlignment() const;
void SetTextHorizontalAlignment(ON::TextHorizontalAlignment halign);
ON::TextHorizontalAlignment LeaderTextHorizontalAlignment() const;
void SetLeaderTextHorizontalAlignment(ON::TextHorizontalAlignment halign);

ArrowType

ON_Arrowhead::arrow_type ArrowType1() const;
void SetArrowType1(ON_Arrowhead::arrow_type);
ON_Arrowhead::arrow_type ArrowType2() const;
void SetArrowType2(ON_Arrowhead::arrow_type);
void SetArrowType1And2(ON_Arrowhead::arrow_type);
ON_Arrowhead::arrow_type LeaderArrowType() const;
void SetLeaderArrowType(ON_Arrowhead::arrow_type);

void SetArrowBlockId1(ON_UUID id);
ON_UUID ArrowBlockId1() const;
void SetArrowBlockId2(ON_UUID id);
ON_UUID ArrowBlockId2() const;
void SetLeaderArrowBlockId(ON_UUID id);
ON_UUID LeaderArrowBlockId() const;