Represents a single 2D drawing of a model.
Encapsulates sheets, views, and layers with various 2D geometry. An object of this class is a counterpart to the Model class, meaning that it represents all drawing-related information for a single 3D model. If the model is entirely 2D, an object corresponds to a single input file.
new Drawing(
sheet?):Drawing
Creates a drawing.
Optional sheet used to initialize the drawing with a single sheet.
Drawing
readonlylayers:Set<Layer>
Layers contained in the drawing.
readonlysheets:Set<Sheet>
Sheets contained in the drawing.
get id():
bigint
Returns the unique identifier of the object.
bigint
get numberOfLayers():
number
Returns the number of layers in the drawing.
Use Drawing.layers and layers.size instead.
number
get numberOfSheets():
number
Returns the number of sheets in the drawing.
Use Drawing.sheets and sheets.size instead.
number
addLayer(
layer):void
Adds a layer to the drawing.
Layer to add.
void
Use Drawing.layers and layers.add(layer) instead.
addSheet(
sheet):void
Adds a sheet to the drawing.
Sheet to add.
void
Use Drawing.sheets and sheets.add(sheet) instead.