Show / Hide Table of Contents

Class HeaderVariables

Represents the header variables of a DXF document.

Inheritance
System.Object
HeaderVariables
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: netDxf.Header
Assembly: CADability.dll
Syntax
public class HeaderVariables

Constructors

| Improve this Doc View Source

HeaderVariables()

Initializes a new instance of the SystemVariables.

Declaration
public HeaderVariables()
Remarks

The default values are the same ones that are apply to a new AutoCad drawing.

Properties

| Improve this Doc View Source

AcadVer

The AutoCAD drawing database version number.

Declaration
public DxfVersion AcadVer { get; set; }
Property Value
Type Description
DxfVersion
Remarks

Only AutoCad2000 and higher DXF versions are supported.

Exceptions
Type Condition
System.NotSupportedException

Only AutoCad2000 and higher DXF versions are supported.

| Improve this Doc View Source

Angbase

Angle 0 base.

Declaration
public double Angbase { get; }
Property Value
Type Description
System.Double
Remarks

Default value: 0.

| Improve this Doc View Source

Angdir

The angle direction.

Declaration
public AngleDirection Angdir { get; }
Property Value
Type Description
AngleDirection
Remarks

Default value: CCW.

| Improve this Doc View Source

AttMode

Attribute visibility.

Declaration
public AttMode AttMode { get; set; }
Property Value
Type Description
AttMode
Remarks

Default value: Normal.

| Improve this Doc View Source

AUnits

Units format for angles.

Declaration
public AngleUnitType AUnits { get; set; }
Property Value
Type Description
AngleUnitType
Remarks

Default value: Decimal degrees.

| Improve this Doc View Source

AUprec

Units precision for angles.

Declaration
public short AUprec { get; set; }
Property Value
Type Description
System.Int16
Remarks

Valid values are integers from 0 to 8. Default value: 0.

| Improve this Doc View Source

CeColor

Current entity color.

Declaration
public AciColor CeColor { get; set; }
Property Value
Type Description
AciColor
Remarks

Default value: 256 (ByLayer). This header variable only supports indexed colors.

| Improve this Doc View Source

CeLtScale

Current entity line type scale.

Declaration
public double CeLtScale { get; set; }
Property Value
Type Description
System.Double
Remarks

Default value: 1.0.

| Improve this Doc View Source

CeLtype

Current entity line type name.

Declaration
public string CeLtype { get; set; }
Property Value
Type Description
System.String
Remarks

Default value: ByLayer.

| Improve this Doc View Source

CeLweight

Current entity line weight.

Declaration
public Lineweight CeLweight { get; set; }
Property Value
Type Description
Lineweight
Remarks

Default value: -1 (ByLayer).

| Improve this Doc View Source

CLayer

Current layer name.

Declaration
public string CLayer { get; set; }
Property Value
Type Description
System.String
Remarks

Default value: 0.

| Improve this Doc View Source

CMLJust

Current multiline justification.

Declaration
public MLineJustification CMLJust { get; set; }
Property Value
Type Description
MLineJustification
Remarks

Default value: 0 (Top).

| Improve this Doc View Source

CMLScale

Current multiline scale.

Declaration
public double CMLScale { get; set; }
Property Value
Type Description
System.Double
Remarks

Default value: 20.

| Improve this Doc View Source

CMLStyle

Current multiline style.

Declaration
public string CMLStyle { get; set; }
Property Value
Type Description
System.String
Remarks

Default value: Standard.

| Improve this Doc View Source

DimStyle

Current dimension style.

Declaration
public string DimStyle { get; set; }
Property Value
Type Description
System.String
Remarks

Default value: Standard.

| Improve this Doc View Source

DwgCodePage

Drawing code page; set to the system code page when a new drawing is created, but not otherwise maintained by AutoCAD.

Declaration
public string DwgCodePage { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Extnames

Controls symbol table naming.

Declaration
public bool Extnames { get; }
Property Value
Type Description
System.Boolean
Remarks

Default value: 1.
Controls symbol table naming:
0 = Release 14 compatibility. Limits names to 31 characters in length.
Names can include the letters A to Z, the numerals 0 to 9, and the special characters dollar sign ($), underscore (_), and hyphen (-).
1 = AutoCAD 2000.
Names can be up to 255 characters in length, and can include the letters A to Z, the numerals 0 to 9, spaces, and any special characters not used for other purposes by Microsoft Windows and AutoCAD.

| Improve this Doc View Source

HandleSeed

Next available handle.

Declaration
public string HandleSeed { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

InsBase

Insertion base point for the current drawing.

Declaration
public Vector3 InsBase { get; set; }
Property Value
Type Description
Vector3
Remarks

When you insert or externally reference the current drawing into other drawings, this base point is used as the insertion base point.

| Improve this Doc View Source

InsUnits

Specifies a drawing units value for automatic scaling of blocks, images, or xRefs when inserted or attached to a drawing.

Declaration
public DrawingUnits InsUnits { get; set; }
Property Value
Type Description
DrawingUnits
Remarks

Default value: Unitless.
It is not recommend to change this value, if the LUnits variable has been set to Architectural or Engineering, they require the InsUnits to be set at Inches.

| Improve this Doc View Source

LastSavedBy

User name that saved the file.

Declaration
public string LastSavedBy { get; set; }
Property Value
Type Description
System.String
Remarks

By default it uses the user name of the person who is currently logged on to the Windows operating system.
This header variable is not compatible with AutoCad2000 or lower versions.

| Improve this Doc View Source

LtScale

Global line type scale.

Declaration
public double LtScale { get; set; }
Property Value
Type Description
System.Double
Remarks

Default value: 1.0.

| Improve this Doc View Source

LUnits

Units format for coordinates and distances.

Declaration
public LinearUnitType LUnits { get; set; }
Property Value
Type Description
LinearUnitType
Remarks

Default value: Decimal.
If the LUnits is set to Architectural or Engineering the InsUnits variable will be set to Inches automatically.

| Improve this Doc View Source

LUprec

Units precision for coordinates and distances.

Declaration
public short LUprec { get; set; }
Property Value
Type Description
System.Int16
Remarks

Valid values are integers from 0 to 8. Default value: 4.

| Improve this Doc View Source

LwDisplay

Controls the display of line weights on the Model or Layout tab.

Declaration
public bool LwDisplay { get; set; }
Property Value
Type Description
System.Boolean
Remarks

Default value: false.
false = Line weight is not displayed.
true = Line weight is displayed.

| Improve this Doc View Source

MirrText

Controls if the text will be mirrored during a symmetry.

Declaration
public bool MirrText { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

PdMode

Controls the PointShape to draw a point entity.

Declaration
public PointShape PdMode { get; set; }
Property Value
Type Description
PointShape
Remarks

Default value: PointShape.Dot.

| Improve this Doc View Source

PdSize

Controls the size of the point figures, except for PDMODE values 0 (Dot) and 1 (Empty).

Declaration
public double PdSize { get; set; }
Property Value
Type Description
System.Double
Remarks

Default value: 0.
A setting of 0 generates the point at 5 percent of the drawing area height.
A positive PDSIZE value specifies an absolute size for the point figures.
A negative value is interpreted as a percentage of the viewport size.

| Improve this Doc View Source

PLineGen

Governs the generation of line type patterns around the vertexes of a 2D polyline.

Declaration
public short PLineGen { get; set; }
Property Value
Type Description
System.Int16
Remarks

Default value: 0.
1 = Line type is generated in a continuous pattern around vertexes of the polyline.
0 = Each segment of the polyline starts and ends with a dash.

| Improve this Doc View Source

PsLtScale

Controls paper space line type scaling.

Declaration
public short PsLtScale { get; set; }
Property Value
Type Description
System.Int16
Remarks

Default value: 1.
1 = No special line type scaling.
0 = Viewport scaling governs line type scaling.

| Improve this Doc View Source

TdCreate

Local date/time of drawing creation.

Declaration
public DateTime TdCreate { get; set; }
Property Value
Type Description
System.DateTime
Remarks

This date/time is local to the time zone where the file was created.

| Improve this Doc View Source

TdinDwg

Cumulative editing time for this drawing.

Declaration
public TimeSpan TdinDwg { get; set; }
Property Value
Type Description
System.TimeSpan
| Improve this Doc View Source

TduCreate

Universal date/time the drawing was created.

Declaration
public DateTime TduCreate { get; set; }
Property Value
Type Description
System.DateTime
| Improve this Doc View Source

TdUpdate

Local date/time of last drawing update.

Declaration
public DateTime TdUpdate { get; set; }
Property Value
Type Description
System.DateTime
Remarks

This date/time is local to the time zone where the file was created.

| Improve this Doc View Source

TduUpdate

Universal date/time the drawing was created.

Declaration
public DateTime TduUpdate { get; set; }
Property Value
Type Description
System.DateTime
| Improve this Doc View Source

TextSize

Default text height.

Declaration
public double TextSize { get; set; }
Property Value
Type Description
System.Double
Remarks

Default value: 2.5.

| Improve this Doc View Source

TextStyle

Current text style.

Declaration
public string TextStyle { get; set; }
Property Value
Type Description
System.String
Remarks

Default value: Standard.

| Improve this Doc View Source

UcsOrg

Origin of current UCS (in WCS).

Declaration
public Vector3 UcsOrg { get; set; }
Property Value
Type Description
Vector3
| Improve this Doc View Source

UcsXDir

Direction of the current UCS X axis (in WCS).

Declaration
public Vector3 UcsXDir { get; set; }
Property Value
Type Description
Vector3
Remarks

The vectors UcsXDir and UcsYDir must be perpendicular.

| Improve this Doc View Source

UcsYDir

Direction of the current UCS Y axis (in WCS).

Declaration
public Vector3 UcsYDir { get; set; }
Property Value
Type Description
Vector3
Remarks

The vectors UcsXDir and UcsYDir must be perpendicular.

Methods

| Improve this Doc View Source

AddCustomVariable(HeaderVariable)

Adds a custom HeaderVariable to the list.

Declaration
public void AddCustomVariable(HeaderVariable variable)
Parameters
Type Name Description
HeaderVariable variable

Header variable to add to the list.

Remarks

All header variable names must start with the character '$'.
Header variable names that already exists in the known list cannot be added.

| Improve this Doc View Source

ClearCustomVariables()

Removes all custom HeaderVariable from the list.

Declaration
public void ClearCustomVariables()
| Improve this Doc View Source

ContainsCustomVariable(String)

Checks if a custom HeaderVariable name exits in the list.

Declaration
public bool ContainsCustomVariable(string name)
Parameters
Type Name Description
System.String name

Header variable name.

Returns
Type Description
System.Boolean

True if a header variable name exits in the list; otherwise, false.

Remarks

The header variable name is case insensitive.

| Improve this Doc View Source

CustomNames()

Gets a collection of the custom header variables names.

Declaration
public List<string> CustomNames()
Returns
Type Description
System.Collections.Generic.List<System.String>

A list with the custom header variables names.

| Improve this Doc View Source

CustomValues()

Gets a collection of the custom header variables.

Declaration
public List<HeaderVariable> CustomValues()
Returns
Type Description
System.Collections.Generic.List<HeaderVariable>

A list with the custom header variables.

| Improve this Doc View Source

KnownNames()

Gets a collection of the known header variables names.

Declaration
public List<string> KnownNames()
Returns
Type Description
System.Collections.Generic.List<System.String>

A list with the known header variables names.

| Improve this Doc View Source

KnownValues()

Gets a collection of the known header variables.

Declaration
public List<HeaderVariable> KnownValues()
Returns
Type Description
System.Collections.Generic.List<HeaderVariable>

A list with the known header variables.

| Improve this Doc View Source

RemoveCustomVariable(String)

Removes a custom HeaderVariable from the list.

Declaration
public bool RemoveCustomVariable(string name)
Parameters
Type Name Description
System.String name

Header variable to add to the list.

Returns
Type Description
System.Boolean

True if the element is successfully found and removed; otherwise, false.

Remarks

The header variable name is case insensitive.

| Improve this Doc View Source

TryGetCustomVariable(String, out HeaderVariable)

Gets the header variable associated with the specified name.

Declaration
public bool TryGetCustomVariable(string name, out HeaderVariable variable)
Parameters
Type Name Description
System.String name

The name of the header variable to get.

HeaderVariable variable

When this method returns, contains the header variable associated with the specified name, if the name is found; otherwise, it contains null.

Returns
Type Description
System.Boolean

True if the list contains a header variable with the specified name; otherwise, false.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX