SketchGroups.add Method

Parent Object: SketchGroups
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/SketchGroups.h>

Description

Creates a new group (folder) to organize sketches within the Sketches node in the browser. Both arguments are optional. If a name is not provided, Fusion assigns a default name that can be changed later using the name property of the returned group. If a set of sketches is provided, those sketches are moved into the newly created group; if a sketch is already a member of another group it is moved out of that group and into the new one.

Syntax

"sketchGroups_var" is a variable referencing a SketchGroups object.

# Uses no optional arguments.
returnValue = sketchGroups_var.add()

# Uses optional arguments.
returnValue = sketchGroups_var.add(name, items)
"sketchGroups_var" is a variable referencing a SketchGroups object.

#include <Fusion/Components/SketchGroups.h>

// Uses no optional arguments.
returnValue = sketchGroups_var->add();

// Uses optional arguments.
returnValue = sketchGroups_var->add(name, items);
"sketchGroups_var" is a variable referencing a SketchGroups object.

// Uses no optional arguments.
returnValue = sketchGroups_var.add();

// Uses Optional arguments.
returnValue = sketchGroups_var.add(name, items);

Return Value

Type Description
SketchGroup Returns the newly created SketchGroup or null if the creation failed.

Parameters

Name Type Description
name string The name to use for the new group. If this is an empty string, Fusion assigns a default name.

This is an optional argument whose default value is "".
items Base[] An array of Sketch and/or SketchGroup objects to move into the new group. If this is null or empty, an empty group is created.

This is an optional argument whose default value is null.

Version

Introduced in version November 2026