Line Types

Components for reading, creating and editing AutoCAD line type patterns.


AC-LTypeLineTypes

AutoCAD Line Type

AutoCAD Line Type icon

AutoCAD › LineTypes · Introduced v1.0.0

Reads the details of an existing AutoCAD line type pattern and breaks them out into separate values. Feed it a line pattern and you get back its name and identifier for inspection or onward use.

Inputs

LinePatternAutoCAD LineType

An AutoCAD Line Pattern

Outputs

NameText

The name of the AutoCAD Line Pattern.

The Id of the AutoCAD Line Pattern.

See also

Set AutoCAD Line Type, Get AutoCAD Line Types, Get AutoCAD Line Type By Name, Create AutoCAD Line Type



AC-AddLTLineTypes

Create AutoCAD Line Type

Create AutoCAD Line Type icon

AutoCAD › LineTypes · Introduced v1.0.0, updated v1.0.20

Creates a new line type in an AutoCAD document. Give it a name and, optionally, a pattern length, number of dashes and whether the pattern scales to fit geometry; if no document is supplied the active drawing is used. The new line type's details are returned. If a line type with the same name already exists it is returned instead of creating a duplicate.

Inputs

DocumentAutoCAD Documentoptional

An AutoCAD Document. If not provided, the active document will be used.

NameText

The name of the AutoCAD LineType

PatternLengthNumber

Total length of the linetype pattern

NumberOfDashesInteger

Number of dash segments in the pattern

ScaleToFitBoolean

Whether to scale pattern to fit geometry

Outputs

NameText

The name of the AutoCAD LineType

The Id of the AutoCAD LineType

PatternLengthNumber

Total length of the linetype pattern

NumberOfDashesInteger

Number of dash segments in the pattern

ScaleToFitBoolean

Whether the pattern is scaled to fit geometry

CommentsText

Comments associated with the linetype

Menu & behaviour

  • Recomputes automatically when relevant objects are added, modified, or erased in the AutoCAD/Civil document.

Exceptions

LevelMessageCause & fix
ErrorNo active AutoCAD document availableNo document was supplied and no drawing is open. Open a drawing or connect a document.
ErrorPatternLength must be positive or zeroA negative pattern length was supplied. Use zero or a positive value.
ErrorNumberOfDashes must be non-negativeA negative dash count was supplied. Use zero or a positive whole number.
WarningLineType already existsA line type of that name is already in the drawing; the existing line type is returned. Choose a different name to create a new one.

See also

AutoCAD Line Type, Get AutoCAD Line Type By Name, Get AutoCAD Line Types, Set AutoCAD Line Type



AC-LTypeLineTypes

Get AutoCAD Line Type By Name

Get AutoCAD Line Type By Name icon

AutoCAD › LineTypes · Introduced v1.0.0, updated v1.0.20

Finds a single line type in an AutoCAD drawing by its exact name. Optionally target a specific document; if none is supplied the active drawing is searched. Use this when you already know the line type name and want to pull just that one.

Inputs

DocumentAutoCAD Documentoptional

An AutoCAD Document. If not provided, the active document will be used.

NameText

The name of the AutoCAD LineType to retrieve

Outputs

The AutoCAD LineType matching the name, or the default linetype if no matching linetype is found

Menu & behaviour

  • Recomputes automatically when relevant objects are added, modified, or erased in the AutoCAD/Civil document.

Exceptions

LevelMessageCause & fix
ErrorNo active AutoCAD document availableNo document was supplied and no drawing is open. Open a drawing or connect a document.
WarningNo layout exists with name: {name}No line type matches the supplied name. Check the spelling, or use Get AutoCAD Line Types to list available line types.

See also

AutoCAD Line Type, Get AutoCAD Line Types, Create AutoCAD Line Type, Set AutoCAD Line Type



AC-LTypesLineTypes

Get AutoCAD Line Types

Get AutoCAD Line Types icon

AutoCAD › LineTypes · Introduced v1.0.0, updated v1.0.20

Returns every line type in an AutoCAD drawing as a list. Optionally target a specific document; if none is supplied the active drawing is used. Use this to browse all line types or to feed downstream nodes that filter or process them.

Inputs

DocumentAutoCAD Documentoptional

An AutoCAD Document. If not provided, the active document will be used.

Outputs

The AutoCAD LineTypes

Menu & behaviour

  • Recomputes automatically when relevant objects are added, modified, or erased in the AutoCAD/Civil document.

Exceptions

LevelMessageCause & fix
ErrorNo active AutoCAD document availableNo document was supplied and no drawing is open. Open a drawing or connect a document.

See also

AutoCAD Line Type, Get AutoCAD Line Type By Name, Create AutoCAD Line Type, Set AutoCAD Line Type



AC-SetLTLineTypes

Set AutoCAD Line Type

Set AutoCAD Line Type icon

AutoCAD › LineTypes · Introduced v1.0.0, updated v1.0.4

Edits the properties of an existing AutoCAD line type. Connect a line type and supply any of the new name, pattern length, dash count, scale-to-fit setting or comments; values you leave unconnected keep their current settings. The updated details are returned.

Inputs

An AutoCAD LineType

NewNameTextoptional

The name of the AutoCAD Layer.

NewPatternLengthNumberoptional

New pattern length

NewNumberOfDashesIntegeroptional

New number of dashes

NewScaleToFitBooleanoptional

New scale to fit setting

NewCommentsTextoptional

New comments for the linetype

Outputs

NameText

The name of the AutoCAD LineType

The Id of the AutoCAD LineType

PatternLengthNumber

Total length of the linetype pattern

NumberOfDashesInteger

Number of dash segments in the pattern

ScaleToFitBoolean

Whether the pattern is scaled to fit geometry

CommentsText

Comments associated with the linetype

Exceptions

LevelMessageCause & fix
ErrorLine Type name cannot be emptyThe supplied name was blank or whitespace. Provide a valid line type name.
ErrorPatternLength must be positive or zeroA negative pattern length was supplied. Use zero or a positive value.
ErrorNumberOfDashes must be non-negativeA negative dash count was supplied. Use zero or a positive whole number.
ErrorNo document availableThe drawing that owns this line type could not be located. Make sure the source drawing is open.

See also

AutoCAD Line Type, Create AutoCAD Line Type, Get AutoCAD Line Type By Name, Get AutoCAD Line Types