getSelectedCADBodies

Overview

This utility is used to retrieve the name and the corresponding index of selected CAD bodies.

Syntax

BodyDetails = simlab.getSelectedCADBodies()

Use Case

It aids in scripting and automation tasks where CAD bodies may have identical names. By exposing both the name and index, users can reference each body more reliably in their operations.

Why we need this utility?

In scenarios where multiple bodies share the same name (such as instances of the same component), relying solely on names can lead to ambiguity. This utility provides access to both the name and its pre-assigned index, allowing users to distinguish between identical-named bodies. This is particularly useful for precise selection, mapping, and processing in scripting workflows.

Utility Input/output

Example