DrawingDocument.drawing Property

Parent Object: DrawingDocument
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/DrawingDocument.h>

Description

Returns the Drawing product object associated with this drawing document.

Syntax

"drawingDocument_var" is a variable referencing a DrawingDocument object.
# Get the value of the property.
propertyValue = drawingDocument_var.drawing
"drawingDocument_var" Is a variable referencing a DrawingDocument Object.
#include <Drawing/Drawing/DrawingDocument.h>

// Get the value of the property.
Ptr<Drawing> propertyValue = drawingDocument_var->drawing();
"drawingDocument_var" Is a variable referencing a DrawingDocument Object.
// Get the value of the property.
propertyValue = drawingDocument_var.drawing;

Property Value

This is a read only property whose value is a Drawing.

Samples

Name Description
Export PDF Sample

Demonstrates exporting a Fusion drawing to PDF using Drawing.exportManager, DrawingExportManager.createPDFExportOptions, and execute. Configures PDFExportOptions for sheet selection (all, range, or current), line weights, and output filename.

Before running: A drawing document must be the active document (not a design). Open or create a drawing with at least one sheet, then run the script from Scripts and Add-Ins. If no drawing is active, the sample reports that a drawing document is required.

Version

Introduced in version December 2020