AutoCAD.BlockReference
Inherits from AutoCAD.Entity
Description
A class that encapsulates a block reference in a DWG file.
This class is a FlexScript wrapper for the AcDbBlockReference class.
Properties
blockTableRecord | Gets the id of block reference's block definition. |
dynamicBlockTableRecord | Gets the id of the reference's dynamic block definition. |
isDynamicBlock | True if the block references a dynamic block. |
position | Gets/sets the position of block reference. |
properties | A 0-based array of AutoCAD.DynamicBlockProperty's. Use length to see the number of properties, and the [] array operator to access a dynamic block property. |
rotation | Gets/sets the rotation of block reference. |
scaleFactors | Gets/sets the scale factor of block reference. |
Methods
create | Creates a new AutoCAD.BlockReference object. |
Details
AutoCAD.BlockReference.blockTableRecord
readonly AutoCAD.ObjectId blockTableRecord
Description
Gets the id of block reference's block definition.
AutoCAD.BlockReference.dynamicBlockTableRecord
readonly AutoCAD.ObjectId dynamicBlockTableRecord
Description
Gets the id of the reference's dynamic block definition.
If a block is a dynamic block, the references to that block will have two id's that reference their block definitions. First, the blockTableRecord, references a 'hidden' block definition that defines the block that is customized for that specific reference, with its specific parameters. The 'dynamicBlockTableRecord' references the original, named block definition that the user actually defines/edits in the Block Editor.
Note that the FlexScript AutoCAD.BlockReference class combines both the AcDbBlockReference as well as the AcDbDynBlockReference class together.
AutoCAD.BlockReference.isDynamicBlock
readonly int isDynamicBlock
Description
True if the block references a dynamic block.
AutoCAD.BlockReference.position
Vec3 position
Description
Gets/sets the position of block reference.
AutoCAD.BlockReference.properties
properties
Description
A 0-based array of AutoCAD.DynamicBlockProperty's. Use length to see the number of properties, and the [] array operator to access a dynamic block property.
AutoCAD.BlockReference.rotation
double rotation
Description
Gets/sets the rotation of block reference.
AutoCAD.BlockReference.scaleFactors
Vec3 scaleFactors
Description
Gets/sets the scale factor of block reference.
AutoCAD.BlockReference.create()
AutoCAD.BlockReference create( ) |
Returns
AutoCAD.BlockReference | A new AutoCAD.BlockReference object. |
Description
Creates a new AutoCAD.BlockReference object.
var blockReference = AutoCAD.BlockReference.create();