    

 ## On this page

  

 

 # Class MotorDesignAPI

 Last update: 16.07.2025 

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

This class implements APIs for drivetrain class.

```csharp
public static class MotorDesignAPI

```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ← [MotorDesignAPI](VM.API.Pre.GearTrain.MotorDesignAPI.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

### CreateMotorDesigner(GearTrainDocument, Vector, Vector, HousingType, StatorMountingType, string)

Create .

```csharp
[NotNull(new string[] { "document" })]
[NotZeroMagnitude(new string[] { "rotateAxis" })]
public static Obj CreateMotorDesigner(this GearTrainDocument document, Vector position, Vector rotateAxis, MotorDesigner.HousingType housingType = HousingType.Integrated, MotorDesigner.StatorMountingType statorMountingType = StatorMountingType.PressFit, string name = "")

```

#### Parameters

`document` GearTrainDocument

The document to create the ..

`position` Vector

The position of the motor designer.

`rotateAxis` Vector

The rotate axis of the motor designer.

`housingType` MotorDesigner.HousingType

The housing type of the motor designer.

`statorMountingType` MotorDesigner.StatorMountingType

The stator mounting type of the motor designer.

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

The name of the motor designer.

#### Returns

Obj

the new  object created by this API.

#### Exceptions

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

Will be thrown if 'document' argument is empty.

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

Will be thrown if the magnitude of 'rotateAxis' is 0.