    

 ## On this page

  

 

 # Class MotorEMForceAPI

 Last update: 09.03.2026 

<a id="VM_API_Pre_GearTrain_MotorEMForceAPI"></a>

Namespace: [VM.API.Pre.GearTrain](VM.API.Pre.GearTrain.md)  
Assembly: VM.API.Pre.GearTrain.dll

This class implements APIs for  class.

```csharp
public static class MotorEMForceAPI

```

#### Inheritance

object ← [MotorEMForceAPI](VM.API.Pre.GearTrain.MotorEMForceAPI.md)

#### Extension Methods

[LinkPropertyItemCache.GetLinkProperties(object, LinkPropertyType)](VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkProperties_System_Object_VM_Models_Pre_LinkPropertyType_), [LinkPropertyItemCache.GetLinkPropertiesAndValues(object, LinkPropertyType)](VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkPropertiesAndValues_System_Object_VM_Models_Pre_LinkPropertyType_), [LinkPropertyItemCache.GetLinkedObjects&lt;T&gt;(object, LinkPropertyType)](VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkedObjects__1_System_Object_VM_Models_Pre_LinkPropertyType_)

## Methods

### <a id="VM_API_Pre_GearTrain_MotorEMForceAPI_CreateMotorEMForce_VM_Managed_DAFUL_GearTrain_GearTrainDocument_VM_API_Pre_Obj_VM_API_Pre_Obj_VM_Vector_VM_Vector_VM_Vector_VM_API_Pre_Obj_System_String_"></a> CreateMotorEMForce(GearTrainDocument, Obj, Obj, Vector, Vector, Vector, Obj, string)

Create .

```csharp
[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 .

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

The rotor body. The type is .

`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 .

`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  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 .

ArgumentNullException

Will be thrown if type of 'rotorBody' is not .

ArgumentNullException

Will be thrown if type of 'referenceOfRotational' is not .

### <a id="VM_API_Pre_GearTrain_MotorEMForceAPI_CreateMotorEMForceForANSYSMotion_VM_Managed_DAFUL_GearTrain_GearTrainDocument_VM_API_Pre_Obj_VM_API_Pre_Obj_VM_Vector_VM_Vector_VM_Vector_VM_API_Pre_Obj_System_String_"></a> CreateMotorEMForceForANSYSMotion(GearTrainDocument, Obj, Obj, Vector, Vector, Vector, Obj, string)

Create .

```csharp
[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 .

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

The rotor body. The type is .

`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 .

`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  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 .

ArgumentNullException

Will be thrown if type of 'rotorBody' is not .

ArgumentNullException

Will be thrown if type of 'referenceOfRotational' is not .

### <a id="VM_API_Pre_GearTrain_MotorEMForceAPI_CreateMotorEMForceForJMAG_VM_Managed_DAFUL_GearTrain_GearTrainDocument_VM_API_Pre_Obj_VM_API_Pre_Obj_VM_Vector_VM_Vector_VM_Vector_VM_API_Pre_Obj_System_String_"></a> CreateMotorEMForceForJMAG(GearTrainDocument, Obj, Obj, Vector, Vector, Vector, Obj, string)

Create .

```csharp
[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 .

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

The rotor body. The type is .

`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 .

`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  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 .

ArgumentNullException

Will be thrown if type of 'rotorBody' is not .

ArgumentNullException

Will be thrown if type of 'referenceOfRotational' is not .