Skip to main content

Motion Standalone Preprocessor C# library 2025 R1

Class SwitchableBodyAPI

Last update: 16.07.2025

Namespace: VM.API.Pre
Assembly: VM.API.Pre.dll

This class implements APIs for class.

public static class SwitchableBodyAPI

Inheritance

objectSwitchableBodyAPI

Extension Methods

LinkPropertyItemCache.GetLinkProperties(object, LinkPropertyType), LinkPropertyItemCache.GetLinkPropertiesAndValues(object, LinkPropertyType), LinkPropertyItemCache.GetLinkedObjects(object, LinkPropertyType)

Methods

CreateSwitchableBody(SubSystemDocument, IEnumerable, Obj?, string, SymmetricType)

Create

[NotNull(new string[] { "doc", "bodies" })]
public static Obj CreateSwitchableBody(this SubSystemDocument doc, IEnumerable<obj> bodies, Obj? selectedBody = null, string name = "", SymmetricType symmetricType = SymmetricType.None)

Parameters

doc SubSystemDocument

The to create a switchable body.

bodies IEnumerableObj&gt;

The connectable bodies of a switchable body.

selectedBody Obj?

The selected connectable body of a switchable body.

name string

The name of a switchable body.

symmetricType SymmetricType

The symmetric type of the new .

Returns

Obj

The new object that is created by this API.

Exceptions

ArgumentNullException

Will be thrown if 'doc', 'bodies' argument is null.

ArgumentException

Will be thrown if the type of 'bodies', 'selectedBody' is not .

ArgumentException

Will be thrown if the element of 'bodies' does not contain 'selectedBody'.

Connect with Ansys