> ## 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 MotorEMForceAPI

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

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

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

#### Inheritance

object ←
[MotorEMForceAPI](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.API.Pre.GearTrain.MotorEMForceAPI.md)

#### Extension Methods

[LinkPropertyItemCache.GetLinkProperties(object, LinkPropertyType)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/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/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/lib/VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkedObjects__1_System_Object_VM_Models_Pre_LinkPropertyType_)

## Methods

### CreateMotorEMForce(GearTrainDocument, Obj, Obj, Vector, Vector, Vector, Obj, string)

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

```csharp theme={null}
[NotNull(new string[] { "document" })]
[NotNullObj(new string[] { "statorBody", "rotorBody", "referenceOfRotational" })]
[NotZeroMagnitude(new string[] { "zAxis", "xAxis" })]
public static Obj CreateMotorEMForce(this GearTrainDocument document, Obj statorBody, Obj rotorBody, Vector position, Vector zAxis, Vector xAxis, Obj referenceOfRotational, string motorEMForceName = "")
```

#### Parameters

`document` [GearTrainDocument](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDGearTrain/GearTrainDocument.cs)

The document to create the motor em force.

`statorBody` [Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

The stator body. The type is [ObjectBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.ObjectBase.md).

`rotorBody` [Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

The rotor body. The type is [ObjectBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.ObjectBase.md).

`position` Vector

The position.

`zAxis` Vector

The z axis.

`xAxis` Vector

The x axis.

`referenceOfRotational` [Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

The reference of rotational. The type is [ObjectBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.ObjectBase.md).

`motorEMForceName` string

The name of the motor em force. If empty, default name starts with 'Motor\_' will be generated and used.

#### Returns

[Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

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

#### Exceptions

ArgumentNullException

Will be thrown if 'document' or 'statorBody' or 'rotorBody' or 'referenceOfRotational' arguments are empty.

ArgumentException

Will be thrown if the magnitude of zAxis' or 'xAxis' is 0.

ArgumentNullException

Will be thrown if type of 'statorBody' is not [ObjectBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.ObjectBase.md).

ArgumentNullException

Will be thrown if type of 'rotorBody' is not [ObjectBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.ObjectBase.md).

ArgumentNullException

Will be thrown if type of 'referenceOfRotational' is not [ObjectBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.ObjectBase.md).

### CreateMotorEMForceForANSYSMotion(GearTrainDocument, Obj, Obj, Vector, Vector, Vector, Obj, string)

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

```csharp theme={null}
[NotNull(new string[] { "document" })]
[NotNullObj(new string[] { "statorBody", "rotorBody", "referenceOfRotational" })]
[NotZeroMagnitude(new string[] { "zAxis", "xAxis" })]
public static Obj CreateMotorEMForceForANSYSMotion(this GearTrainDocument document, Obj statorBody, Obj rotorBody, Vector position, Vector zAxis, Vector xAxis, Obj referenceOfRotational, string motorEMForceName = "")
```

#### Parameters

`document` [GearTrainDocument](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDGearTrain/GearTrainDocument.cs)

The document to create the motor em force for ANSYS Motion.

`statorBody` [Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

The stator body. The type is [ObjectBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.ObjectBase.md).

`rotorBody` [Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

The rotor body. The type is [ObjectBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.ObjectBase.md).

`position` Vector

The position.

`zAxis` Vector

The z axis.

`xAxis` Vector

The x axis.

`referenceOfRotational` [Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

The reference of rotational. The type is [ObjectBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.ObjectBase.md).

`motorEMForceName` string

The name of the motor em force. If empty, default name starts with 'Motor\_' will be generated and used.

#### Returns

[Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

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

#### Exceptions

ArgumentNullException

Will be thrown if 'document' or 'statorBody' or 'rotorBody' or 'referenceOfRotational' arguments are empty.

ArgumentException

Will be thrown if the magnitude of zAxis' or 'xAxis' is 0.

ArgumentNullException

Will be thrown if type of 'statorBody' is not [ObjectBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.ObjectBase.md).

ArgumentNullException

Will be thrown if type of 'rotorBody' is not [ObjectBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.ObjectBase.md).

ArgumentNullException

Will be thrown if type of 'referenceOfRotational' is not [ObjectBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.ObjectBase.md).

### CreateMotorEMForceForJMAG(GearTrainDocument, Obj, Obj, Vector, Vector, Vector, Obj, string)

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

```csharp theme={null}
[NotNull(new string[] { "document" })]
[NotNullObj(new string[] { "statorBody", "rotorBody", "referenceOfRotational" })]
[NotZeroMagnitude(new string[] { "zAxis", "xAxis" })]
public static Obj CreateMotorEMForceForJMAG(this GearTrainDocument document, Obj statorBody, Obj rotorBody, Vector position, Vector zAxis, Vector xAxis, Obj referenceOfRotational, string motorEMForceName = "")
```

#### Parameters

`document` [GearTrainDocument](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDGearTrain/GearTrainDocument.cs)

The document to create the motor em force for JMAG.

`statorBody` [Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

The stator body. The type is [ObjectBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.ObjectBase.md).

`rotorBody` [Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

The rotor body. The type is [ObjectBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.ObjectBase.md).

`position` Vector

The position.

`zAxis` Vector

The z axis.

`xAxis` Vector

The x axis.

`referenceOfRotational` [Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

The reference of rotational. The type is [ObjectBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.ObjectBase.md).

`motorEMForceName` string

The name of the motor em force. If empty, default name starts with 'Motor\_' will be generated and used.

#### Returns

[Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

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

#### Exceptions

ArgumentNullException

Will be thrown if 'document' or 'statorBody' or 'rotorBody' or 'referenceOfRotational' arguments are empty.

ArgumentException

Will be thrown if the magnitude of zAxis' or 'xAxis' is 0.

ArgumentNullException

Will be thrown if type of 'statorBody' is not [ObjectBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.ObjectBase.md).

ArgumentNullException

Will be thrown if type of 'rotorBody' is not [ObjectBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.ObjectBase.md).

ArgumentNullException

Will be thrown if type of 'referenceOfRotational' is not [ObjectBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.ObjectBase.md).
