Method SetAttributeFromBlock
- Namespace
- GeometryHelper.Dxf
- Assembly
- GeometryHelper.dll
SetAttributeFromBlock(DxfAttributeDefinition, GeoTransform3)
Fills the attribute from its definition in a block, as AutoCAD's SetAttributeFromBlock: the definition's text
(its words as the default value, its height, rotation, alignment, style and the rest), tag, flags, field length and
lock, and its look, then placed by the transformation that places the block, an INSERT's
BlockTransform. Its prompt is not an attribute's and is left out. A definition of
several lines gives its embedded MTEXT and makes the attribute one of several lines, its type (71) 2 where the
definition's is 4, as ezdxf writes them, its value the words of every line of that MTEXT joined by spaces, as
AutoCAD 2021 writes it. A definition not aligned left on its baseline gives its alignment point placed, the origin
where its record has none: centred on (0, 0) in a block an INSERT places at (6000, 1000), it gives an attribute held
by (6000, 1000), written 11 6000 21 1000, as AutoCAD 2021 gave it (check D30). An annotative attribute is placed so
in the context it is shown at (Position), its other contexts left as they were, and its
record where that context is the default: AutoCAD 2021 put ATT_DVSUP of its sample at (5.278, 265.33) in its context
of 1:1 alone where 1:2 was the default, its record keeping the default's point and given the height 6, at 1:2, of the
definition 3 high (check D35).
public void SetAttributeFromBlock(DxfAttributeDefinition definition, GeoTransform3 blockTransform)
Parameters
definitionDxfAttributeDefinitionThe definition, of the block the INSERT places.
blockTransformGeoTransform3The transformation that places the block.
Exceptions
- ArgumentNullException
Thrown when the definition or the transformation is null.
- ArgumentException
Thrown when the transformation flattens the text.
- InvalidOperationException
Thrown when the attribute is erased.
SetAttributeFromBlock(GeoTransform3)
Places the attribute again from its definition, as AutoCAD's SetAttributeFromBlock of one transformation does:
the definition of its tag in the block its INSERT places, by SetAttributeFromBlock(DxfAttributeDefinition, GeoTransform3).
public void SetAttributeFromBlock(GeoTransform3 blockTransform)
Parameters
blockTransformGeoTransform3The transformation that places the block.
Exceptions
- ArgumentNullException
Thrown when the transformation is null.
- InvalidOperationException
Thrown when the attribute is of no INSERT, or its block has no definition of its tag.