Document & Objects

Inspect AutoCAD documents, colours, object ids and database objects, and retrieve objects from a drawing by id or handle.


AC-ColorDocument

AutoCAD Color

AutoCAD Color icon

AutoCAD › Document · Introduced v1.2.25

Builds an AutoCAD colour from a variety of inputs, or breaks an existing AutoCAD colour down into its parts. You can supply an RGB colour, an AutoCAD Colour Index, or flag the colour as ByLayer or ByBlock, and the node returns a unified AutoCAD colour along with each of those representations. When several inputs are given the highest-priority one wins, in the order AutoCAD Colour, then ByLayer, then ByBlock, then ColorIndex, then RGB Colour; if nothing is supplied it defaults to ByLayer.

Inputs

AutoCAD ColorAutoCAD Colouroptional

An existing AutoCAD color to deconstruct. Highest priority.

ColorColouroptional

RGB color value. Lowest priority. If AutoCAD Color is set then this property will have not effect.

ColorIndexIntegeroptional

AutoCAD Color Index (1-255). Special values: 256=ByLayer, 0=ByBlock. If AutoCAD Color is set then this property will have not effect.

ByBlockBooleanoptional

If true, use ByBlock color (inherits from containing block). If AutoCAD Color is set then this property will have not effect.

ByLayerBooleanoptional

If true, use ByLayer color (inherits from layer). Default if no inputs. If AutoCAD Color is set then this property will have not effect.

Outputs

AutoCAD ColorAutoCAD Colour

The resulting AutoCAD color.

ColorColour

RGB color value (resolved, may not reflect ByLayer/ByBlock).

ColorIndexInteger

AutoCAD Color Index. Special values: 256=ByLayer, 0=ByBlock.

ByBlockBoolean

True if color is set to ByBlock.

ByLayerBoolean

True if color is set to ByLayer.

Exceptions

LevelMessageCause & fix
ErrorNo active AutoCAD document availableThere is no open AutoCAD drawing to resolve the colour against. Open a drawing in AutoCAD before running the node.

See also

AutoCAD DBObject




AC-DbObjDocument

AutoCAD DBObject

AutoCAD DBObject icon

AutoCAD › Document · Introduced v1.0.16, updated v1.2.25

Reads the common properties of any AutoCAD database object. It always returns the object's identity (Id, handle, type name and extension dictionary), and when the object is a drawing entity it additionally reports its display properties such as layer, colour, material, linetype and lineweight. Use it to inspect or filter objects pulled from a drawing. The entity-specific outputs stay empty for objects that are not entities.

Inputs

DBObjectAutoCAD Object

An AutoCAD DBObject

Outputs

The ObjectId of the AutoCAD DBObject.

HandleInteger

The Handle value of the AutoCAD DBObject.

TypeText

The Type name of the AutoCAD DBObject.

ExtensionDictionaryIdAutoCAD ObjectId

The ExtensionDictionary Id of the AutoCAD DBObject.

LayerNameText

The layer name of the Entity. Null if not an Entity.

The layer ObjectId of the Entity. Null if not an Entity.

The AutoCAD color of the Entity (supports ByLayer/ByBlock). Null if not an Entity.

MaterialNameText

The material name of the Entity. Null if not an Entity.

The material ObjectId of the Entity. Null if not an Entity.

LinetypeNameText

The linetype name of the Entity. Null if not an Entity.

The linetype ObjectId of the Entity. Null if not an Entity.

LineWeightInteger

The lineweight of the Entity in 1/100mm. -1=ByLayer, -2=ByBlock, -3=Default. Null if not an Entity.

See also

AutoCAD Object Id, AutoCAD Color, Get By Id, Get By Handle




AC-DocDocument

AutoCAD Document

AutoCAD Document icon

AutoCAD › Document · Introduced v1.0.0, updated v1.0.9

Reports details about an AutoCAD document, including its file name, file path, and whether it is read-only or the currently active drawing. If no document is supplied it uses the active document. Use it to identify which drawing your definition is working with.

Inputs

DocumentAutoCAD Documentoptional

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

Outputs

File NameText

The name of the AutoCAD file.

File PathText

The file path of the AutoCAD file.

Read OnlyBoolean

Boolean value indicating if the AutoCAD file is read only.

ActiveBoolean

Boolean value indicating if the AutoCAD file is the active document at the time the solution is being solved.

Exceptions

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

See also

Get AutoCAD Documents




AC-ObjIdDocument

AutoCAD Object Id

AutoCAD Object Id icon

AutoCAD › Document · Introduced v1.0.0, updated v1.0.13

Reports details about an AutoCAD ObjectId reference, including its numeric value, whether it is still valid, whether it has been erased, and the internal handle AutoCAD uses to store the object. Use it to verify that a referenced object still exists in the drawing.

Inputs

An AutoCAD ObjectId

Outputs

ValueInteger

The value of the AutoCAD ObjectId.

Is ValidBoolean

Boolean value indicating if the AutoCAD ObjectId is valid

Is ErasedBoolean

Boolean value indicating if the AutoCAD ObjectId is erased

Object HandleInteger

The internal Handle which AutoCAD uses to store the object

Exceptions

LevelMessageCause & fix
ErrorNo document availableThe drawing that owns this ObjectId could not be located and no drawing is open. Open the relevant drawing in AutoCAD.

See also

AutoCAD DBObject, Get By Id, Named Id




AC-DocsDocument

Get AutoCAD Documents

Get AutoCAD Documents icon

AutoCAD › Document · Introduced v1.0.0

Returns every AutoCAD document that is currently open in the session, along with which one is the active drawing. Use it as a starting point when you want to choose or iterate over the open drawings.

Outputs

AutoCAD Documents

Active DocumentAutoCAD Document

The currently active AutoCAD Document

See also

AutoCAD Document




AC-ByHandleDocument

Get By Handle

Get By Handle icon

AutoCAD › Document · Introduced v1.0.13

Looks up the AutoCAD object whose handle matches the value you provide and returns it. If no document is supplied it searches the active drawing. Use it to retrieve a specific object when you know its persistent handle.

Inputs

DocumentAutoCAD Documentoptional

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

ObjectHandleInteger

An AutoCAD ObjectHandle

Outputs

ObjectGeneric

An Autocad Object

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 in AutoCAD. Open a drawing or connect a document to the input.

See also

Get By Id, AutoCAD DBObject




AC-ByIdDocument

Get By Id

Get By Id icon

AutoCAD › Document · Introduced v1.0.0, updated v1.0.13

Looks up the AutoCAD object whose ObjectId matches the one you provide and returns it. If no document is supplied it searches the active drawing. Use it to retrieve a specific object from an ObjectId reference.

Inputs

DocumentAutoCAD Documentoptional

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

An AutoCAD ObjectId

Outputs

ObjectGeneric

An Autocad Object

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 in AutoCAD. Open a drawing or connect a document to the input.

See also

Get By Handle, AutoCAD Object Id, AutoCAD DBObject




NamedIdDocument

Named Id

Named Id icon

AutoCAD › Document · Introduced v1.2.19

Breaks a Named Id apart into its display name and the underlying AutoCAD ObjectId reference, and reports whether the Named Id is valid. Use it to read the human-readable label and the object reference that a Named Id carries together.

Inputs

Named IdNamed Id

A Named Id combining a name with an ObjectId

Outputs

NameText

The display name of the referenced object.

The AutoCAD ObjectId reference.

Is ValidBoolean

Boolean indicating if this NamedId is valid.

See also

AutoCAD Object Id