BodyGroups.add Method

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

Description

Creates a new group (folder) to organize bodies within the Bodies 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 bodies is provided, those bodies are moved into the newly created group; if a body is already a member of another group it is moved out of that group and into the new one.

Syntax

"bodyGroups_var" is a variable referencing a BodyGroups object.

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

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

#include <Fusion/Components/BodyGroups.h>

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

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

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

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

Return Value

Type Description
BodyGroup Returns the newly created BodyGroup 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 BRepBody, MeshBody, and/or BodyGroup 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