Table of Contents

Class DxfDynamicBlockReferenceProperty

Namespace
GeometryHelper.Dxf
Assembly
GeometryHelper.dll

One dynamic property of an INSERT of a dynamic block, as AutoCAD's DynamicBlockReferenceProperty gives it: the name a parameter of the block shows it by, its value for this INSERT as AutoCAD saved it, and the values it may take. The value of a linear, XY, polar, point, rotation, flip, visibility or lookup parameter, in a block of the actions the library writes or of the stretches and moves AutoCAD's Block Editor writes besides, is set as AutoCAD sets it (Value); the others are read only.

public sealed class DxfDynamicBlockReferenceProperty
Inheritance
DxfDynamicBlockReferenceProperty
Inherited Members

Remarks

The INSERT of a door whose linear parameter Width AutoCAD stretched from 900 to 1 000 gives the property Width, of the value 1 000.0 (a double), Distance, and GetAllowedValues() 800, 900 and 1 000 where the parameter keeps that list. See DynamicBlockReferencePropertyCollection for what each kind of parameter gives.

Properties

Description

Gets the description the parameter gives the property, as AutoCAD's Description; empty where it gives none.

PropertyName

Gets the name the property is shown by, as AutoCAD's PropertyName: the label of its parameter, Width for a linear parameter labelled so; a point parameter's label with " X" and " Y" after it, Anchor X and Anchor Y.

PropertyTypeCode

Gets the kind of value, as AutoCAD's PropertyTypeCode numbers it by its DwgDataType: 1 for a double, 3 for a short, 5 for a string, 12 for the point of an Origin (a GeoPoint3).

ReadOnly

Gets whether AutoCAD lets the property be set, as its ReadOnly: true for a value looked up whose table does not allow looking back (its column's reverse lookup off); and for the distance of a horizontal, a vertical, an aligned or a radial constraint parameter a column of a block properties table holds whose properties must match a row, as AutoCAD 2021 read Width and Height of its Fluorescent sample (plugin D27b), whose value is set all the same, as AutoCAD set Width 1 200 there.

Show

Gets whether AutoCAD's Properties palette lists the property, as AutoCAD's Show: its parameter's Show properties of the Block Editor, false for Stud Height and Stud Width of AutoCAD's Stud sample, whose values its lookups set; true for a property of no such setting.

StateNames

Gets the names a flip parameter gives its two states, for its values 0 and 1, as AutoCAD's Properties palette shows them: Not flipped and Flipped as the Block Editor names them, Left and Right for Hinge of AutoCAD's Door sample. Empty for a property of another kind, whose values name themselves.

UnitsType

Gets what the value measures, as AutoCAD's UnitsType: a length, an angle, or nothing.

Value

Gets or sets the property's value for this INSERT, as AutoCAD's Value: a double for a length or an angle (in radians), a short for the state of a flip (0 not flipped, 1 flipped), a string for a visibility state or a value looked up, a GeoPoint3 for the Origin of a parameter, its base point in the block's coordinates (set to a point of the file's coordinates, as AutoCAD sets it: see below).

VisibleInCurrentVisibilityState

Gets whether the property's parameter is shown in the visibility state the INSERT shows, as AutoCAD's VisibleInCurrentVisibilityState: true for a block of no visibility parameter and for that parameter's own property; else whether the state lists the parameter, as AutoCAD 2021 read Angle of its Toilet sample in the state Elongated (Front) as not visible, and showed no grip of it. AutoCAD's Properties palette lists a property only where it is visible so and Show is true. The library's own blocks of a visibility parameter list no other parameter in any state, and AutoCAD reads every other property of them as not visible (plugin GhDyn1).

Methods

GetAllowedValues()

Gets the values the property may take, as AutoCAD's GetAllowedValues: the list of a parameter's value set, lengths scaled as Value is, with the block's own value where the list was written without it, after the last value below it, as AutoCAD 2021 gave Door Size of its Door sample, own 750, the values 600, 700, 750, 800, 900 and 1 000 (plugin D26b); every visibility state by name; 0 and 1 for a flip; the values a lookup table gives, and its label of no match last for a lookup that is read only, Custom of AutoCAD's Roller Bearing. Empty where the parameter keeps no list, as for a value set of an increment or of none.

MoveBasePoint(GeoVector3)

Moves the base point of the linear, XY or polar parameter this property is a distance of, as a grip of AutoCAD's moves it: the end point stays, the INSERT keeps the base point where it was moved to, and the block is worked out from there, as with Value. A plate 100 by 50 of an XY parameter from (0, 0) to (100, 50), its right and top edges stretched by the end point, whose base point is moved by (20, 0) reads Width 80 and keeps its right edge at x 100, as AutoCAD 2021 read the plate whose corner of base x and end y was dragged by (20, 10), the top edge going up by 10 with the end point's y (plugin GhDy2a); a stretch or a move tied to the base point (BaseXDelta, BaseYDelta) moves its points by the move, and an array starts where the base point is, as AutoCAD drew the array of its XY sample's INSERT whose base point a grip took from (0, 5) to (0, 104.30). Moves add up: moving by (20, 0) and then by (5, 0) keeps the base point 25 along x. The distances the move leaves are taken to the parameter's value set and the base point stands where they put it, the end point staying, as AutoCAD 2021 read Width 70 and the base point 30 where a panel of Width 50 to 300 by 10 had its base grip dragged by 33, and Width 50 and 50 by 60 (plugin GhDy3a); an axis of an XY parameter the move leaves alone is not taken. The base point of a polar parameter is moved anywhere: a pointer from (0, 0) to (100, 0) whose base point is moved by (30, 10) reads Length 81.39 and Angle 354.3 degrees, its lines stay (the end point stays), and the INSERT's history gets the record GRIPLOC of the parameter's base grip, (30, 10, 0), as AutoCAD 2021 wrote it; a polar stretch worked out after it turns the lines about the new base point, and after an end grip dragged before it works the edits out one after the other, as AutoCAD did (the end grip to (0, 50), the base grip by 30 and the end grip to (35, 0) leave the first line from (45.43, 25.72) to (35, 0), plugin GhDb4a). The history keeps the move of the base grip of a linear or an XY parameter too, in a block that keeps one (a polar parameter, an array or a scale action), and a stretch or an array that follows the base point stays where it stands at the next value set. A move of no more than 1E-12, or one a second move brings back, leaves no record.

MoveCornerPoint(GeoPoint3, bool)

Drags a corner grip of the XY parameter this property is a distance of, other than its end corner, to a point, as AutoCAD's grip does: the corner takes the distance of one axis from the base point to the point, taken to its value set, and moves the base point along the other axis to the point, the end point staying. The corner of base x and end y (takesXFromEnd false) takes the distance along y; the corner of end x and base y takes the one along x. The INSERT's history gets the one record GRIPLOC of the corner's grip, how far the corner went, in the block's coordinates, in a block that keeps one, and none of the distance or of the base grip, as AutoCAD 2021 wrote it: a plate 100 by 50 of an XY parameter from (0, 0) to (100, 50) whose corner of base x and end y is dragged by (10, 5) reads Width 90 and Height 55, the right edge staying at x 100, and keeps GRIPLOC (10, 5, 0).

MoveEndPoint(GeoPoint3)

Drags the end grip of the linear, XY, polar, rotation or point parameter this property is a distance, an angle or a position of to a point, as AutoCAD's grip does: the distance and the angle of the point from the base point, taken to their value sets, are the parameter's values, the block is worked out from them (a polar stretch turning and moving what it holds), and the INSERT's history gets the record GRIPLOC of the parameter's end grip, how far the end point went in this drag, in the block's coordinates, as AutoCAD 2021 wrote it. A pointer of two lines from (0, 0) to (100, 0), at (1 000, 500), whose end grip is dragged to (1 000, 550) reads Length 50 and Angle 90 degrees, runs its line to (0, 50) and keeps GRIPLOC (-100, 50, 0); dragged to (1 010, 500) next it keeps the one record, (-90, 0, 0), the two moves added, unless another record came between (plugin GhDy3a). The end grip of a linear parameter takes the distance along its line from the base point, that of an XY parameter each distance along its axis, each taken to its value set, and the history keeps the same GRIPLOC of the grip in a block that keeps one (plugin GhDb4a). The grip of a point parameter takes the position to the point (by (20, 10) it keeps GRIPLOC (20, 10, 0)), and the end grip of a rotation parameter takes the angle of the point about the base point from its base angle, to its value set: a bar 60 long about (0, 300) whose end grip goes from (60, 300) to (0, 360) reads a quarter turn and keeps GRIPLOC (-60, 60, 0), as AutoCAD 2021 wrote them.

ToString()

Gives the property as a line for debugging: its name and its value.