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

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

This class implements APIs for Housing class.

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

#### Inheritance

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

#### Extension Methods

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

## Methods

### CreateEFHousing(GearTrainDocument, string)

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

```csharp theme={null}
[NotNull(new string[] { "document" })]
public static Obj CreateEFHousing(this GearTrainDocument document, string housingName = "")
```

#### Parameters

`document` GearTrainDocument

The document to create the EF housing.

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

The name of the EF housing. If empty, default name starts with 'Housing\_' will be generated and used.

#### Returns

Obj

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

#### Exceptions

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

Will be thrown if 'document' argument is empty.

### CreateFEHousing(GearTrainDocument, string)

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

```csharp theme={null}
[NotNull(new string[] { "document" })]
public static Obj CreateFEHousing(this GearTrainDocument document, string housingName = "")
```

#### Parameters

`document` GearTrainDocument

The [GearTrainDocument](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.DAFUL.GearTrain.GearTrainDocument.md) to create the FE housing.

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

The name of the FE housing. If empty, default name starts with 'Housing\_' will be generated and used.

#### Returns

Obj

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

#### Exceptions

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

Will be thrown if 'document' argument is empty.

### UpdateBodyInFE(HiddenDocumentFEBase, BodyAnalysisType)

Update nodal body in fe shaftset/housing designer.

```csharp theme={null}
[NotNull(new string[] { "document" })]
public static void UpdateBodyInFE(this HiddenDocumentFEBase document, BodyAnalysisType bodyAnalysisType)
```

#### Parameters

`document` HiddenDocumentFEBase

The [HiddenDocumentFEBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.DAFUL.GearTrain.HiddenDocumentFEBase.md) to exist nodal body.

`bodyAnalysisType` BodyAnalysisType

The body analysis type.

#### Exceptions

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

Will be thrown if 'document' or 'nodalBody' arguments are empty.

### UpdateBodyInMeshFree(HiddenDocumentMeshFreeBase, BodyAnalysisType, MassPropertyType, ExpressionValueVariable?, IEnumerable\<ExpressionValueVariable>)

Update assembled body in ef shaftset/housing designer.

```csharp theme={null}
[NotNull(new string[] { "document" })]
public static void UpdateBodyInMeshFree(this HiddenDocumentMeshFreeBase document, BodyAnalysisType bodyAnalysisType, SolidBodyProperty.MassPropertyType massPropertyType = MassPropertyType.PreDefined, ExpressionValueVariable? mass = null, IEnumerable<ExpressionValueVariable> momentOfInertia = null)
```

#### Parameters

`document` HiddenDocumentMeshFreeBase

The [HiddenDocumentMeshFreeBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.DAFUL.GearTrain.HiddenDocumentMeshFreeBase.md) to exist assembled body.

`bodyAnalysisType` BodyAnalysisType

The body analysis type.

`massPropertyType` SolidBodyProperty.MassPropertyType

The mass property type. The default value is PreDefined.

`mass` ExpressionValueVariable?

The mass when 'massPropertyType' is User. The default value is 1.

`momentOfInertia` [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)\<ExpressionValueVariable>

The moment of inertia when 'massPropertyType' is User.

#### Exceptions

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

Will be thrown if 'document' or 'assembledBody' arguments are empty.

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

Will be thrown if 'massPropertyType' is User and 'mass' or 'momentOfInertia' are empty.

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

Will be thrown if the length of 'momentOfInertia' is not 6.

### UpdateDesignerInMesh(HiddenDocumentMeshBase)

Update designer in fe/ef shaftset/housing.

```csharp theme={null}
[NotNull(new string[] { "document" })]
public static void UpdateDesignerInMesh(this HiddenDocumentMeshBase document)
```

#### Parameters

`document` HiddenDocumentMeshBase

The [HiddenDocumentMeshBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.DAFUL.GearTrain.HiddenDocumentMeshBase.md) to update designer.

#### Exceptions

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

Will be thrown if 'document' argument is empty.
