SketchSymbols.addNew Method

Parent Object: SketchSymbols

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/Symbols/SketchSymbols.h>

Description

Creates a new, empty sketch symbol in the drawing and returns it. The symbol is persisted immediately and appears in this collection; add geometry to it through SketchSymbol.lines, rectangles, circles, arcs, and ellipses. Creating a symbol does not place it on a sheet; use Sheet.insertSketchSymbol for that.

Syntax

"sketchSymbols_var" is a variable referencing a SketchSymbols object.

# Uses no optional arguments.
returnValue = sketchSymbols_var.addNew()

# Uses optional arguments.
returnValue = sketchSymbols_var.addNew(name)
"sketchSymbols_var" is a variable referencing a SketchSymbols object.

#include <Drawing/Symbols/SketchSymbols.h>

// Uses no optional arguments.
returnValue = sketchSymbols_var->addNew();

// Uses optional arguments.
returnValue = sketchSymbols_var->addNew(name);
"sketchSymbols_var" is a variable referencing a SketchSymbols object.

// Uses no optional arguments.
returnValue = sketchSymbols_var.addNew();

// Uses Optional arguments.
returnValue = sketchSymbols_var.addNew(name);

Return Value

Type Description
SketchSymbol Returns the newly created SketchSymbol, or null if the operation failed.

Parameters

Name Type Description
name string The name for the new sketch symbol. Must be unique within the drawing. Optional; if empty, a default unique name is assigned.

This is an optional argument whose default value is "".

Version

Introduced in version November 2026