Skip to content

Get DWG Info ​

Description ​

The Get DWG Info node analyzes AutoCAD DWG files and extracts detailed information such as blocks, layers, layouts, external references (Xrefs), and paper configurations.
It can detect whether a DWG originated from Autodesk Inventor and, if not, performs a full structural breakdown of the drawing using the MinuteView DWG Interop Engine.

This node is particularly useful in workflows that validate drawing quality, detect missing references, or prepare data for downstream automation (e.g., publishing PDFs, extracting title blocks, or generating reports).


How It Works ​

When executed, the node:

  1. Validates that the input file exists.
  2. Checks whether the DWG was created in Autodesk Inventor.
  3. If Inventor DWG → Logs and exits early (no further breakdown needed).
  4. If standard AutoCAD DWG → Extracts:
    • Blocks
    • Layers (including off/frozen/locked states)
    • Layouts and plot settings
    • External references (Xrefs)
    • Paper sizes and plot configurations
  5. Logs the results and stores all extracted data as task output variables.

Input Fields ​

FieldTypeDescriptionRequired
File PathTextFull path to the DWG file to analyze.✅

Output Data ​

The node returns a structured dataset describing the contents and state of the DWG file.
Below is a list of all populated output variables:

Output VariableTypeDescription
IsInventorDWGBooleanTrue if the file originated from Autodesk Inventor.
BlocksList<BlockInfo>List of all block definitions found in the DWG.
BlockCountNumberNumber of blocks found.
XrefsList<XrefInfo>List of external references (paths, status, etc.).
XrefCountNumberNumber of Xrefs detected.
LayersList<LayerInfo>Full list of drawing layers, including status flags.
LayerCountNumberTotal number of layers.
OffLayersList<LayerInfo>Layers that are turned off.
FrozenLayersList<LayerInfo>Layers that are frozen.
LockedLayersList<LayerInfo>Layers that are locked.
OffLayerCountNumberCount of layers that are off.
FrozenLayerCountNumberCount of frozen layers.
LockedLayerCountNumberCount of locked layers.
LayoutsList<LayoutInfo>All layouts (model and paper space).
LayoutCountNumberNumber of layouts.
HasModelSpaceBooleanWhether a model space layout exists.
PaperSpaceLayoutsList<LayoutInfo>Paper space layouts only.
PaperSpaceLayoutCountNumberNumber of paper space layouts.
PaperSizesList<string>Unique canonical paper sizes found.
PlotConfigurationsList<string>Unique plot configuration (.pc3) names found.
MissingXrefsList<XrefInfo>List of missing Xrefs (where Status = NotFound).
HasMissingXrefsBooleanTrue if any Xrefs are missing.

Example Output ​

json
{
  "IsInventorDWG": false,
  "Blocks": [
    { "Name": "TITLEBLOCK_A3", "DefinitionCount": 1 },
    { "Name": "NORTH_ARROW", "DefinitionCount": 2 }
  ],
  "Xrefs": [
    { "Name": "ELECTRICAL_PLAN", "Path": "Xrefs/Electrical.dwg", "Status": 0 },
    { "Name": "MECHANICAL_PLAN", "Path": "Xrefs/Mechanical.dwg", "Status": 1 }
  ],
  "HasMissingXrefs": true,
  "MissingXrefs": [
    { "Name": "MECHANICAL_PLAN", "Path": "Xrefs/Mechanical.dwg", "Status": 1 }
  ],
  "Layers": [
    { "Name": "DIMENSIONS", "IsFrozen": false, "IsLocked": false, "IsOff": false },
    { "Name": "NOTES", "IsFrozen": true, "IsLocked": false, "IsOff": false }
  ],
  "Layouts": [
    { "Name": "Model", "IsModelSpace": true },
    { "Name": "A3_SHEET", "IsModelSpace": false, "PlotConfigName": "DWG To PDF.pc3" }
  ],
  "PaperSizes": ["ISO_A3_(420.00_x_297.00_MM)"],
  "PlotConfigurations": ["DWG To PDF.pc3"],
  "taskMessage": "Done",
  "statusReturn": "Completed"
}

Example Use Case ​

✅ Scenario: Pre-Publish Drawing Validation ​

Goal: Ensure all Xrefs are found and layers are in the correct state before PDF export.

  1. Vault Get File → Retrieve the latest DWG from Autodesk Vault.
  2. Get DWG Info → Analyze the DWG for missing Xrefs, locked layers, or invalid layouts.
  3. Condition Node → Check for HasMissingXrefs = false.
  4. If true → Proceed to AutoCAD Export node (to PDF).
  5. If false → Log issue and send alert via Email Notification.

Task Flow Summary ​

StepAction
1Validates that the DWG file exists.
2Determines whether file originated from Inventor.
3If Inventor DWG → Ends task early (no breakdown needed).
4Otherwise reads blocks, layers, layouts, and Xrefs.
5Identifies off/frozen/locked layers.
6Detects missing Xrefs.
7Gathers paper setup and plot configuration info.
8Outputs data for downstream nodes.

Status Messages ​

StatusDescription
CompletedThe DWG file was successfully analyzed.
FailThe file was missing or could not be read.

Error Handling ​

If an error occurs, the task logs the detailed error and returns Fail. Common causes include:

  • DWG file not found at the specified path.
  • Corrupted or unsupported DWG file format.
  • Permission issues preventing file access.
  • Incompatible AutoCAD or DWG Interop version.

Notes ​

  • Inventor DWGs are identified and skipped (since they store drawing views differently).
  • The node uses the MinuteView.DWG.Interop library to interact with DWG data structures directly (no AutoCAD instance required).
  • Extracted data can be passed into other nodes (e.g., AutoCADExport, CollectionOperations, AI Analyzer) for automation or reporting.
  • File paths can include dynamic placeholders (e.g., {workingFolder}, {FileName}) to adapt across environments.

Typical Workflow Example ​

mermaid
graph LR
    A[Vault Get File] --> B[Get DWG Info]
    B -->|No Missing Xrefs| C[AutoCAD Export (PDF)]
    B -->|Has Missing Xrefs| D[Log Issue & Email Alert]

Category: CAD → AutoCAD Task Name: GetDwgInfo

Tentech 2024