> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Class SwitchableBodyAPI

Namespace: [VM.API.Pre](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.API.Pre)\
Assembly: VM.API.Pre.dll

This class implements APIs for [SwitchableBody](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.DAFUL.SwitchableBody.md) class.

```csharp theme={null}
public static class SwitchableBodyAPI
```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ←
[SwitchableBodyAPI](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.API.Pre.SwitchableBodyAPI.md)

#### Extension Methods

[LinkPropertyItemCache.GetLinkProperties(object, LinkPropertyType)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkProperties_System_Object_VM_Models_Pre_LinkPropertyType_),
[LinkPropertyItemCache.GetLinkPropertiesAndValues(object, LinkPropertyType)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkPropertiesAndValues_System_Object_VM_Models_Pre_LinkPropertyType_),
[LinkPropertyItemCache.GetLinkedObjects\<T>(object, LinkPropertyType)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkedObjects__1_System_Object_VM_Models_Pre_LinkPropertyType_)

## Methods

### CreateSwitchableBody(SubSystemDocument, IEnumerable\<Obj>, Obj?, string, SymmetricType)

Create [SwitchableBody](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.DAFUL.SwitchableBody.md)

```csharp theme={null}
[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 [SubSystemDocument](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.DAFUL.SubSystemDocument.md) to create a switchable body.

`bodies` [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)\<[Obj](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.API.Pre.Obj.md)>

The connectable bodies of a switchable body.

`selectedBody` [Obj](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.API.Pre.Obj.md)?

The selected connectable body of a switchable body.

`name` [string](https://learn.microsoft.com/dotnet/api/system.string)

The name of  a switchable body.

`symmetricType` SymmetricType

The symmetric type of the new [SwitchableBody](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.DAFUL.SwitchableBody.md).

#### Returns

[Obj](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.API.Pre.Obj.md)

The new [SwitchableBody](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.DAFUL.SwitchableBody.md) object that is created by this API.

#### Exceptions

[ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception)

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

[ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception)

Will be thrown if the type of 'bodies', 'selectedBody' is not [IConnectable](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.DAFUL.IConnectable.md).

[ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception)

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