Class vdAttrib
- Namespace
- VectorDraw.Professional.vdFigures
- Assembly
- VectorDraw.Professional.dll
Represents an attribute instance that can be attached to a block reference.
The vdAttrib class extends vdText to provide attribute-specific semantics:
a tag identifier (TagString), a stored value (ValueString), visibility control (InVisibleMode),
and flags controlling whether the attribute is treated as constant or has a locked position.
public sealed class vdAttrib : vdText, IDisposable, IVDSerialise, IBaseObject
- Inheritance
-
vdAttrib
- Implements
- Inherited Members
Examples
See vdAttribDef for an example of how vdAttrib instances are created and used in conjunction with block references (vdInsert) and attribute definitions (vdAttribDef).
Remarks
Use vdAttrib to store and render attribute data defined by an attribute definition inside a block see Attributes.
Typically, vdAttrib instances are created and managed by the block reference (vdInsert) when inserting blocks with attributes ( see vdAttribDef.)
See also CreateDefaultAttributes() which creates default vdAttrib instances based on the block's attribute definitions.
Key behaviors:
TagStringidentifies the attribute occurrence within a block.ValueStringcontains the displayed or stored value; multi-line content is supported (MText) and is automatically handled when necessary.InVisibleModecontrols whether the attribute is hidden independently of the parent block.IsConstantandIsLockedPositionaffect editing and grip behaviour for attribute instances. The class participates in the VectorDraw serialization pipeline and raises document modification events (OnBeforeModifyObject / OnAfterModifyObject) when important properties change, enabling undo/history tracking.
Constructors
- vdAttrib()
Initializes a new instance of the vdAttrib object.
- vdAttrib(vdDocument)
Initializes a new instance of the vdAttrib object and registers it to the passed Document.
Properties
- BoxWidth
The width of the ValueString object in drawing units.Lines are broken if they exceed this value.
- InVisibleMode
Get/Set the visibility property of the vdAttrib object.
- IsConstant
Get/Set a value indicating if the Attribute Definition of the object is constant.
- IsLockedPosition
Get/Set a value indicating if the Attribute Definition of the object has Locked Position.
- IsMText
Returns true if the ValueString contains multiline charecters.
- TagString
Get/Set the string which identifies each occurrence of the attribute.
- TextString
Gets the Value string of the vdAttrib object.
- ValueString
Get/Set the default value string of the vdAttrib object.
Methods
- CheckInvisibleMode()
Checks tyhe visibility of the attribute taking into consideration the Document's AttributesMode
- DeSerialize(DeSerializer, string, object)
This Function is called foreach field name of the vdAttrib object when opening in vdml format.
- GetCompareHash()
Returns a unique 32 bit integer value according to the object type and its properties values
- InitializeProperties()
Resets the properties of the vdAttrib object to the Default values.
- IsVisible()
Indicates if the object can be drawn.
- MatchProperties(vdPrimary, vdDocument)
Matches all the common properties from an object and sets them to this object.
- OnDocumentSelected(vdDocument)
This method is called when the object is inserted in a Document for the first time.
- Serialize(Serializer)
This Function is called when saving the vdAttrib object to vdml format.
- ToString()
Gets a System.String that represents the type of the vdAttrib Object.