Block Reference Home

Inserts a named Block that has been defined in the current drawing. When you insert a block, you are inserting a block reference. The information is not simply copied from the block definition to the drawing area. Instead, a link is established between the block reference and the block definition. Therefore, if the block definition is changed, all references are updated automatically. Inserting a block into another block will create nested blocks.

To add a block reference into a drawing use following functions:

Function Meaning
lcBlockAddBlockRef Adds a block reference

Functions for work with Block Attributes:

Function Meaning
lcBlkRefGetFirstAtt
lcBlkRefGetNextAtt
Used to sequentially retrieve all block attributes
lcBlkRefGetAtt Retrieves block attribute by a tag
lcBlkRefGetAttVal Returns attribute value
lcBlkRefPutAttVal Sets attribute value

A block reference has properties and functions derived from base class and the following specific properties:

Property Type Access Meaning
LC_PROP_ENT_...    Base class properties
LC_PROP_BLKREF_BLOCK handle
string
RW Handle to Block
Name of Block
LC_PROP_BLKREF_X float RW Insertion point X
LC_PROP_BLKREF_Y float RW Insertion point Y
LC_PROP_BLKREF_SCALE float RW Uniform scale
LC_PROP_BLKREF_SCX float RW Scale X
LC_PROP_BLKREF_SCY float RW Scale Y
LC_PROP_BLKREF_UFSCALE bool R "Uniform scale" flag
LC_PROP_BLKREF_ANGLE float RW Rotation angle
LC_PROP_BLKREF_ATTRIBS bool R Flag "Block has attributes"

   Array
LC_PROP_BLKREF_ARNX int RW Number of columns
LC_PROP_BLKREF_ARDX float RW Distance between columns
LC_PROP_BLKREF_ARNY int RW Number of rows
LC_PROP_BLKREF_ARDY float RW Distance between rows
LC_PROP_BLKREF_ARANG float RW Rotation angle of the array

   Only for using with LC_CMD_INSERT command
LC_PROP_BLKREF_ONS_XY bool RW Specify position on-screen
LC_PROP_BLKREF_ONS_SCALE bool RW Specify scale on-screen
LC_PROP_BLKREF_ONS_ANGLE bool RW Specify rotation on-screen
LC_PROP_BLKREF_RETURN handle R Handle to inserted object (block reference) after command execution


Grips

0 - insertion point
1 - rotation
2...9 - block scale