Component.allOccurrencesByComponent Method

Parent Object: Component

Derived from: BaseComponent.allOccurrencesByComponent


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

Description

Returns all occurrences, at any level of the assembly, that reference the specified component. The returned list is read-only.

Syntax

"component_var" is a variable referencing a Component object.

returnValue = component_var.allOccurrencesByComponent(component)
"component_var" is a variable referencing a Component object.

#include <Fusion/Components/Component.h>

returnValue = component_var->allOccurrencesByComponent(component);
"component_var" is a variable referencing a Component object.

returnValue = component_var.allOccurrencesByComponent(component);

Return Value

Type Description
OccurrenceList The occurrences referenced by the specified component.

Parameters

Name Type Description
component Component The component that is being referenced by the occurrences that will be returned.

Samples

Name Description
Delete Empty Components

Demonstrates deletes empty components from the active design.

Before running: Run from Scripts and Add-Ins. This sample may open dialogs or require interactive choices; keep Fusion in the foreground. Use a design with assembly structure (components/occurrences) when the script reads existing geometry; some scripts create their own assembly.

Version

Introduced in version August 2014