Skip to content

Get Dwg Info ​

Reads structural information from an AutoCAD DWG file, including blocks, layers, layouts, external references, and paper setup data.

Serialised Task

This task runs through the serialisation queue. Only one instance of this task executes at a time across all concurrent workflows. If multiple workflows reach this task simultaneously, they will queue and execute one at a time.

Purpose ​

Use this task when a workflow needs to inspect a DWG file before acting on it — for example, to detect missing external references before publishing, to enumerate paper space layouts so the correct sheet can be exported, or to check layer states as part of a drawing quality gate. The task also identifies whether the DWG originated from Autodesk Inventor, returning early in that case since Inventor DWGs have a different internal structure. No AutoCAD installation is required; the task reads the file directly.

Inputs ​

FieldTypeRequiredDescription
File PathTextNoFull path to the DWG file to analyse.

Outputs ​

NameDescription
IsInventorDWGTrue if the file was generated by Autodesk Inventor. When true, no further structural data is extracted.
BlocksList of all block definitions found in the drawing.
BlockCountNumber of block definitions.
XrefsList of external reference entries, including path and resolution status.
XrefCountTotal number of external references.
LayersFull list of layers with their current state flags.
LayerCountTotal number of layers.
OffLayersLayers that are currently turned off.
FrozenLayersLayers that are currently frozen.
LockedLayersLayers that are currently locked.
OffLayerCountNumber of layers that are off.
FrozenLayerCountNumber of frozen layers.
LockedLayerCountNumber of locked layers.
LayoutsAll layouts in the file, covering both model space and paper space.
LayoutCountTotal number of layouts.
HasModelSpaceThe model space layout object, if one exists.
PaperSpaceLayoutsPaper space layouts only.
PaperSpaceLayoutCountNumber of paper space layouts.
PaperSizesDistinct canonical paper size names found across paper space layouts.
PlotConfigurationsDistinct plot configuration file names (.pc3) found across paper space layouts.
MissingXrefsExternal references whose status is NotFound.
HasMissingXrefsTrue if at least one external reference could not be resolved.

Tentech