Class HeaderVariable
Defines a header variable.
Inheritance
Inherited Members
Namespace: netDxf.Header
Assembly: CADability.dll
Syntax
public class HeaderVariable
Constructors
| Improve this Doc View SourceHeaderVariable(String, Int16, Object)
Initializes a new instance of the HeaderVariable class.
Declaration
public HeaderVariable(string name, short groupCode, object value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | Header variable name. |
| System.Int16 | groupCode | Header variable group code. |
| System.Object | value | Header variable value. |
Remarks
It is very important to match the group code with its corresponding value type,
check the DXF documentation for details about what group code correspond to its associated type.
For example, typical groups codes are 70, 40, and 2 that correspond to short, double, and string value types, respectively.
If the header value is a Vector3 use the group code 30, if it is a Vector2 use group code 20,
when the variable is written to the DXF the codes 10, 20, and 30 will be added as necessary.
Properties
| Improve this Doc View SourceGroupCode
Gets the header variable group code.
Declaration
public short GroupCode { get; }
Property Value
| Type | Description |
|---|---|
| System.Int16 |
Name
Gets the header variable name.
Declaration
public string Name { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
Remarks
The header variable name is case insensitive.
Value
Gets the header variable stored value.
Declaration
public object Value { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Object |
Remarks
It is very important to match the group code with its corresponding value type,
check the DXF documentation for details about what group code correspond to its associated type.
For example, typical groups codes are 70, 40, and 2 that correspond to short, double, and string value types, respectively.
If the header value is a Vector3 use the group code 30, if it is a Vector2 use group code 20,
when the variable is written to the DXF the codes 10, 20, and 30 will be added as necessary.
Methods
| Improve this Doc View SourceToString()
Obtains a string that represents the header variable.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| System.String | A string text. |