AutoCAD.Dimension
Inherits from AutoCAD.Entity
Description
A class that encapsulates a dimension in a DWG file.
This class is a FlexScript wrapper for the AcDbDimension class.
Properties
arrowFirstIsFlipped | Gets/sets whether the first arrow is flipped or not. |
arrowSecondIsFlipped | Gets/sets whether the second arrow is flipped or not. |
blockTransform | Gets the matrix that describes the mapping from the dim block table record's MCS (microspace coordinate system) out to the WCS (world coordinate system). |
centerMarkSize | Gets the size of the center mark. |
dimBlockId | Gets/sets the Object ID of the Table Record cointaing the entities that this dimension displays. |
dimBlockPosition | The relative position point of the block referenced by the dimension (in WCS). |
dimensionText | The dimension annotation text string (including any multiline text formatting characters). |
horizontalRotation | Gets/sets the horizontal rotation value (in radians) of the dimension. |
inspection | Gets/sets whether or not the inspection flag is set. |
inspectionFrame | Gets/sets the inspection frame style. |
inspectionLabel | Gets/sets the string text of the inspection label. |
inspectionRate | Gets/sets the value of the inspection rate. |
isUsingDefaultTextPosition | Whether or not the text is in the default position for the dimension. |
measurement | The measurement value for this dimension. |
textPosition | Gets/sets the text position point. |
textRotation | Gets/sets the rotation angle (in radians) of the dimension's annotation text. |
Methods
recomputeDimBlock | Updates the block table record the dimension references to match any changes made to the dimension since the last time the block table record was updated. |
removeTextField | If this object contains a text field, this function removes it from the extension dictionary and deletes the field object. |
resetTextDefinedSize | Resets dimension text defined width and defined height to MText in dimension block. |
useDefaultTextPosition | Sets the dimension to use the default text position so that the text position is automatically updated whenever the dimension is changed in such a way that the default text position changes. |
useSetTextPosition | Sets the dimension not to use the default text position so that the text remains unmoved when the dimension's default text position changes (that is, no automatic text position updates will occur). |
Details
AutoCAD.Dimension.arrowFirstIsFlipped
int arrowFirstIsFlipped
Description
Gets/sets whether the first arrow is flipped or not.
If 1, then the first arrow is flipped; 0 if not.AutoCAD.Dimension.arrowSecondIsFlipped
int arrowSecondIsFlipped
Description
Gets/sets whether the second arrow is flipped or not.
If 1, then the second arrow is flipped; 0 if not.AutoCAD.Dimension.blockTransform
readonly Array blockTransform
Description
Gets the matrix that describes the mapping from the dim block table record's MCS (microspace coordinate system) out to the WCS (world coordinate system).
AutoCAD.Dimension.centerMarkSize
readonly double centerMarkSize
Description
Gets the size of the center mark.
AutoCAD.Dimension.dimBlockId
AutoCAD.ObjectId dimBlockId
Description
Gets/sets the Object ID of the Table Record cointaing the entities that this dimension displays.
AutoCAD.Dimension.dimBlockPosition
Vec3 dimBlockPosition
Description
The relative position point of the block referenced by the dimension (in WCS).
The block position is the insertion point of the block referenced by the dimension, relative to the primary definition point (DXF group code 10) of the dimension itself.
The block position (in WCS) is added to the dimension primary definition point (also in WCS) to get the actual insertion point for the anonymous block that is referenced by the dimension. So, for example, changing a dimension's block position from (0,0,0) to (0,0,1) (in WCS) will cause the dimension to display as though it has been moved 1 unit along the WCS Z axis.
For a dimension newly created via any dimension command, the block position will be (0,0,0). For copies of existing dimensions, or if a dimension is moved, the block position will be the offset vector (in WCS) from where the original dimension was located. For example, moving a dimension 1 unit down the WCS Y axis will cause AutoCAD to update the block position value from (0,0,0) to (0,-1,0) (in WCS coordinates).
AutoCAD.Dimension.dimensionText
string dimensionText
Description
The dimension annotation text string (including any multiline text formatting characters).
AutoCAD.Dimension.horizontalRotation
double horizontalRotation
Description
Gets/sets the horizontal rotation value (in radians) of the dimension.
If the default text is the only text in the dimension, this function will return an empty string (for example, ''). If the dimension contains user-defined text along with the default text, this function will return the text with the default text denoted with angle brackets (for example, 'This is the default text <>'). If the dimension contains no text, (for example using the '.' syntax), it will return the '.'. Finally, if the text is user defined but there is no default text, only the user-defined text is returned.
Call measurement to obtain the default measurement and computed text. Alternately, to identify the substring in the block table record is, you can look at the Text entity within the block table record (the object ID for this block table record can be obtained via dimBlockId).
AutoCAD.Dimension.inspection
int inspection
Description
Gets/sets whether or not the inspection flag is set.
If 1, then the flag is set; if 0, then it is not.AutoCAD.Dimension.inspectionFrame
int inspectionFrame
Description
Gets/sets the inspection frame style.
AutoCAD.Dimension.inspectionLabel
string inspectionLabel
Description
Gets/sets the string text of the inspection label.
AutoCAD.Dimension.inspectionRate
string inspectionRate
Description
Gets/sets the value of the inspection rate.
AutoCAD.Dimension.isUsingDefaultTextPosition
int isUsingDefaultTextPosition
Description
Whether or not the text is in the default position for the dimension.
If 1, then the text is using the default position; if 0, then it is not.AutoCAD.Dimension.measurement
readonly double measurement
Description
The measurement value for this dimension.
AutoCAD.Dimension.textPosition
Vec3 textPosition
Description
Gets/sets the text position point.
This is the middle center point of the text (which is itself an MText object with middle-center justification).AutoCAD.Dimension.textRotation
double textRotation
Description
Gets/sets the rotation angle (in radians) of the dimension's annotation text.
This is the angle from the dimension's horizontal axis to the horizontal axis used by the text. The angle is in the dimension's OCS X-Y plane with positive angles going counterclockwise when looking down the OCS Z axis towards the OCS origin.AutoCAD.Dimension.recomputeDimBlock()
recomputeDimBlock( int forceUpdate ) |
Parameters
forceUpdate | Whether or not to force an update. |
Description
Updates the block table record the dimension references to match any changes made to the dimension since the last time the block table record was updated.
If forceUpdate is 1, then the block table record will be updated regardless of whether or not the dimension has had any changes since the last time the block table record was updated. If forceUpdate is 0, then the block table record will only be updated if the dimension has been changed since it was opened, is not currently erased, and is not in the middle of an Undo operation.AutoCAD.Dimension.removeTextField()
removeTextField( ) |
Description
If this object contains a text field, this function removes it from the extension dictionary and deletes the field object.
AutoCAD.Dimension.resetTextDefinedSize()
resetTextDefinedSize( ) |
Description
Resets dimension text defined width and defined height to MText in dimension block.
AutoCAD.Dimension.useDefaultTextPosition()
useDefaultTextPosition( ) |
Description
Sets the dimension to use the default text position so that the text position is automatically updated whenever the dimension is changed in such a way that the default text position changes.
AutoCAD.Dimension.useSetTextPosition()
useSetTextPosition( ) |
Description
Sets the dimension not to use the default text position so that the text remains unmoved when the dimension's default text position changes (that is, no automatic text position updates will occur).