Occurrences.addExistingComponent Method

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

Description

Method that creates a new occurrence using an existing component. This is the equivalent of copying and pasting an occurrence in the user interface.

Syntax

"occurrences_var" is a variable referencing an Occurrences object.
returnValue = occurrences_var.addExistingComponent(component, transform)
"occurrences_var" is a variable referencing an Occurrences object.

#include <Fusion/Components/Occurrences.h>

returnValue = occurrences_var->addExistingComponent(component, transform);

Return Value

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

Parameters

Name Type Description
component Component The existing component to create a new occurrence of.
transform Matrix3D A transform that defines the location for the new occurrence

Samples

Name Description
Component Sample Component related functions

Version

Introduced in version August 2014