DrawingDimensions.addLinearDimension Method

Parent Object: DrawingDimensions

PreviewThis functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.


Defined in namespace "adsk::drawing" and the header file is <Drawing/Sheet/DrawingDimensions.h>

Description

Creates a linear or aligned dimension between two sheet-space definition points.

Syntax

"drawingDimensions_var" is a variable referencing a DrawingDimensions object.

# Uses no optional arguments.
returnValue = drawingDimensions_var.addLinearDimension(startPoint, endPoint, placementPoint)

# Uses optional arguments.
returnValue = drawingDimensions_var.addLinearDimension(startPoint, endPoint, placementPoint, doAlignDim)
"drawingDimensions_var" is a variable referencing a DrawingDimensions object.

#include <Drawing/Sheet/DrawingDimensions.h>

// Uses no optional arguments.
returnValue = drawingDimensions_var->addLinearDimension(startPoint, endPoint, placementPoint);

// Uses optional arguments.
returnValue = drawingDimensions_var->addLinearDimension(startPoint, endPoint, placementPoint, doAlignDim);
"drawingDimensions_var" is a variable referencing a DrawingDimensions object.

// Uses no optional arguments.
returnValue = drawingDimensions_var.addLinearDimension(startPoint, endPoint, placementPoint);

// Uses Optional arguments.
returnValue = drawingDimensions_var.addLinearDimension(startPoint, endPoint, placementPoint, doAlignDim);

Return Value

Type Description
DrawingDimension Returns the newly created DrawingDimension object, or null if creation failed.

Parameters

Name Type Description
startPoint DrawingPoint The first point of the dimension.
endPoint DrawingPoint The second point of the dimension.
placementPoint DrawingPoint The sheet-space location of the dimension line in paper space. Use DrawingPoint.create to supply a standalone point, or a point from a view curve accessor.
doAlignDim boolean When true, creates an aligned dimension parallel to the line between the two points; when false, creates a horizontal or vertical linear dimension.

This is an optional argument whose default value is False.

Version

Introduced in version October 2026