Click or drag to resize
Attribute Class
Attribute represents unique property of an Element. In OOP: property of a class.

An Element may have 1..n attribute instances. Attribute instances of an Element are accesible via it's Attributes collection. AutoCAD treats attributes as both XData records and OpmX properties. Databases treat attributes as table columns (where attribute Name represents column name).

Inheritance Hierarchy

Namespace: FDF.Common.ObjectModel
Assembly: FDF.Common (in FDF.Common.dll) Version: 3.0.0.0
Syntax
[SerializableAttribute]
public class Attribute : Feature, ICloneable

The Attribute type exposes the following members.

Constructors
  NameDescription
Public methodAttribute
See appropriate Feature constructor(s).
Public methodAttribute(String)
See appropriate Feature constructor(s).
Top
Properties
  NameDescription
Public propertyCategoryName
Gets or sets attribute's category name when displayed within property manager. When displayed, attributes need to be grouped into 1..n logical categories.
Public propertyConstraintName
Name of Constraint instance defined within Constraints collection.
Public propertyDataIndex
Gets or sets data index (e.g. XData) this attribute corresponds to.

When Element schema gets instantiated on existing entity, it's data part is usually stored in indexed manner. If DataIndex equals to 0 it indicates that data doesn't get serialized upon the entity itself (see Expression). It's important to keep all data indexes greater than 0 in a row - do not skip index numbers.

Since data indicies are persistant, change them sparingly throughout different versions of an object model.
Public propertyDataType
Public propertyDefaultValue
Gets or sets attribute's default value.

Any new instance of an Element this attribute belongs to will have it's data part set to specified default value. This is very handy for various application settings related to active instance of object model.

Public propertyDisplayIndex
Public propertyDxfCode
DXF code of the underlying data type.

See remarks section for detailed description.

Public propertyExpression
Gets or sets mathematical or logical expression being evaluated at run-time.

Having the expression defined, attribute gets dynamic in nature. Expression parser takes in account unlimited number of both mathematical and logical expressions (finite state machine), accompanied with specialized functions represented by their keywords and attribute Names. Keep in mind that Names and function identifiers are mutually exclusive.

When evaluating other attribute's value, expression parser takes in account other possibly referenced attribute values (as a list of pointers to other attributes). Whitespaces in expression string are optional.

See remarks section for detailed description and examples.

Public propertyFormat
Gets or sets attribute's category name when displayed within property manager. When displayed, attributes need to be grouped into 1..n logical categories.
Public propertyIsBreakEven
Public propertyIsHyperlink
Public propertyIsIdentity
Public propertyIsReactive
Public propertyIsRetired
Public propertyLength
Public propertyPrimitiveDataType
Public propertyReadOnly
Gets or sets whether attribute is read-only when displayed within property manager. Dinamically evaluated attributes (see Expression) are read-only by default.
Public propertyScale
Public propertyStyleName
Public propertyType (Overrides FeatureType.)
Public propertyValue
Public propertyVisibility
Top
Methods
  NameDescription
Public methodClone
Public methodGetDefaultValue
Returns DefaultValue property parsed using the expression keywords.
Public methodGetValueType
Public methodStatic memberIsExpressionKeyword
Returns True if given string represents an expression keyword, False otherwise.
Top
Fields
See Also