    

 ## On this page

  

 

 # Class SolidBodyAPI

 Last update: 09.03.2026 

<a id="VM_API_Pre_SolidBodyAPI"></a>

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

This class implements APIs for  class.

```csharp
public static class SolidBodyAPI

```

#### Inheritance

object ← [SolidBodyAPI](VM.API.Pre.SolidBodyAPI.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_SolidBodyAPI_ChangeSolidBodyAnalysisSetting_VM_API_Pre_Obj_VM_Managed_DAFUL_BodyAnalysisType_"></a> ChangeSolidBodyAnalysisSetting(Obj, BodyAnalysisType)

Change the analysis setting of solid body.

```csharp
[NotNullObj(new string[] { "solidBody" })]
[MatchTypeObj(new object[] { "solidBody", typeof(SolidBody) })]
public static void ChangeSolidBodyAnalysisSetting(this Obj solidBody, BodyAnalysisType type)

```

#### Parameters

`solidBody` [Obj](VM.API.Pre.Obj.md)

The solid body to be changed.

`type` BodyAnalysisType

The body analysis type to be changed.

#### Exceptions

ArgumentNullException

Will be thrown if 'solidBody' arguments are empty.

ArgumentException

Will be thrown if 'solidBody' argument is not empty and type of 'solidBody' is not .

### <a id="VM_API_Pre_SolidBodyAPI_CreateMarker_VM_API_Pre_Obj_VM_TMatrix_System_String_VM_Managed_SymmetricType_"></a> CreateMarker(Obj, TMatrix, string, SymmetricType)

Create  at the given

```csharp
[NotNullObj(new string[] { "body" })]
public static Obj CreateMarker(this Obj body, TMatrix transform, string markerName = "", SymmetricType symmetricType = SymmetricType.None)

```

#### Parameters

`body` [Obj](VM.API.Pre.Obj.md)

The  to create a marker.

`transform` TMatrix

The transformation matrix for a marker.

`markerName` string

The name of the marker. If empty, default name starts with 'MK\_' will be generated and used.

`symmetricType` SymmetricType

The symmetric type

#### Returns

[Obj](VM.API.Pre.Obj.md)

the new  object created by this API.

#### Exceptions

ArgumentNullException

Will be thrown if 'solidBody' is null.

### <a id="VM_API_Pre_SolidBodyAPI_CreateMeshFile_VM_API_Pre_Obj_System_String_System_String_System_Boolean_System_Boolean_System_Boolean_System_String_System_Nullable_VM_API_Pre_FacetParameters__"></a> CreateMeshFile(Obj, string, string, bool, bool, bool, string, FacetParameters?)

Generate mesh file with given  entity.

```csharp
[NotNullObj(new string[] { "body" })]
[NotNullOrEmpty(new string[] { "pathMeshFile" })]
public static Obj CreateMeshFile(this Obj body, string pathMeshFile, string nodalBodyName = "", bool importMeshAfterCreate = true, bool addToModel = true, bool createGroup = false, string groupName = "", FacetParameters? facetParameters = null)

```

#### Parameters

`body` [Obj](VM.API.Pre.Obj.md)

The  to generate mesh file.

`pathMeshFile` string

Generated mesh file path.

`nodalBodyName` string

The name of the new nodal body. If empty, default name will be generated.

`importMeshAfterCreate` bool

The flag that indicates importing new mesh file into the  or not.

`addToModel` bool

The flag that indicates adding new mesh file to the model.

`createGroup` bool

The flag that indicates creating new group by using the solid body and the new nodal body.

`groupName` string

The name of the new group.

`facetParameters` [FacetParameters](VM.API.Pre.FacetParameters.md)?

Facet parameters. If it is not given, default values will be used.

#### Returns

[Obj](VM.API.Pre.Obj.md)

The new NodalBody entity if importMeshAfterCreate flag is true. Otherwise, empty  will be returned.

#### Exceptions

ArgumentNullException

Will be thrown if body or pathMeshFile arguments are empty.

### <a id="VM_API_Pre_SolidBodyAPI_CreateSolidBlock_VM_Managed_DAFUL_SubSystemDocument_VM_Vector_VM_Models_Pre_ExpressionValueVariable_VM_Models_Pre_ExpressionValueVariable_VM_Models_Pre_ExpressionValueVariable_System_String_VM_API_Pre_BooleanOperationType_System_Nullable_System_Drawing_Color__VM_Managed_SymmetricType_System_Boolean_"></a> CreateSolidBlock(SubSystemDocument, Vector, ExpressionValueVariable, ExpressionValueVariable, ExpressionValueVariable, string, BooleanOperationType, Color?, SymmetricType, bool)

Create  with  builder.

```csharp
[NotNull(new string[] { "document" })]
[GreaterThanZero(new string[] { "width", "height", "depth" })]
public static Obj CreateSolidBlock(this SubSystemDocument document, Vector position, ExpressionValueVariable width, ExpressionValueVariable height, ExpressionValueVariable depth, string bodyName = "", BooleanOperationType booleanOperationType = BooleanOperationType.None, Color? color = null, SymmetricType symmetricType = SymmetricType.None, bool isInterface = false)

```

#### Parameters

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

The document to create the block solid body.

`position` Vector

The position to create the block solid body.

`width` [ExpressionValueVariable](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/Pre/Data/VM.Models.Pre/Models/ExpressionValueVariable.cs)

The width of the block.

`height` [ExpressionValueVariable](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/Pre/Data/VM.Models.Pre/Models/ExpressionValueVariable.cs)

The height of the block.

`depth` [ExpressionValueVariable](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/Pre/Data/VM.Models.Pre/Models/ExpressionValueVariable.cs)

The depth of the blodk.

`bodyName` string

The name of the . If empty, default name starts with 'BD\_' will be generated and used. If booleanOperationType argument is other than 'None', this argument must be the existing  name.

`booleanOperationType` [BooleanOperationType](VM.API.Pre.BooleanOperationType.md)

The boolean operation type. If None, new  will be created. otherwise, New block geometry will be merged to the existing  which has same name with 'name' argument.

`color` Color?

The color of the new block geometry. The default value is '0xBFAAAA'

`symmetricType` SymmetricType

The symmetric type of the new .

`isInterface` bool

'true' if it is interface body. Otherwise, 'false'.

#### Returns

[Obj](VM.API.Pre.Obj.md)

The new  object that is created by this API.

#### Exceptions

ArgumentNullException

Will be thrown if 'document' is null.

ArgumentOutOfRangeException

Will be thrown if 'width', 'height', 'depth' values equal to or less than 0.

### <a id="VM_API_Pre_SolidBodyAPI_CreateSolidBlock_VM_Managed_DAFUL_SubSystemDocument_VM_Vector_System_String_"></a> CreateSolidBlock(SubSystemDocument, Vector, string)

Create  with  builder.

```csharp
public static Obj CreateSolidBlock(this SubSystemDocument document, Vector position, string bodyName)

```

#### Parameters

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

The document to create the block solid body.

`position` Vector

The position to create the block solid body.

`bodyName` string

The name of the . If empty, default name starts with 'BD\_' will be generated and used. If booleanOperationType argument is other than 'None', this argument must be the existing  name.

#### Returns

[Obj](VM.API.Pre.Obj.md)

The new  object created by this API.

### <a id="VM_API_Pre_SolidBodyAPI_CreateSolidCylinder_VM_Managed_DAFUL_SubSystemDocument_VM_Vector_VM_Vector_VM_Models_Pre_ExpressionValueVariable_System_String_VM_API_Pre_BooleanOperationType_System_Nullable_System_Drawing_Color__VM_Managed_SymmetricType_System_Boolean_"></a> CreateSolidCylinder(SubSystemDocument, Vector, Vector, ExpressionValueVariable, string, BooleanOperationType, Color?, SymmetricType, bool)

Create  with  builder.

```csharp
[NotNull(new string[] { "document" })]
[GreaterThanZero(new string[] { "radius" })]
public static Obj CreateSolidCylinder(this SubSystemDocument document, Vector bottomPosition, Vector topPosition, ExpressionValueVariable radius, string bodyName = "", BooleanOperationType booleanOperationType = BooleanOperationType.None, Color? color = null, SymmetricType symmetricType = SymmetricType.None, bool isInterface = false)

```

#### Parameters

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

The document to create the cylinder solid body.

`bottomPosition` Vector

The bottom position to create the cylinder solid body.

`topPosition` Vector

The top position to create the cylinder solid body.

`radius` [ExpressionValueVariable](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/Pre/Data/VM.Models.Pre/Models/ExpressionValueVariable.cs)

The radius of the cylinder.

`bodyName` string

The name of the . If empty, default name starts with 'BD\_' will be generated and used. If booleanOperationType argument is other than 'None', this argument must be the existing  name.

`booleanOperationType` [BooleanOperationType](VM.API.Pre.BooleanOperationType.md)

The boolean operation type. If None, new  will be created. otherwise, New cylinder geometry will be merged to the existing  which has same name with 'name' argument.

`color` Color?

The color of the new cylinder geometry. The default value is '0xBFAAAA'

`symmetricType` SymmetricType

The symmetric type of the new .

`isInterface` bool

'true' if it is interface body. Otherwise, 'false'.

#### Returns

[Obj](VM.API.Pre.Obj.md)

The new  object that is created by this API.

#### Exceptions

ArgumentNullException

Will be thrown if 'document' is null.

ArgumentOutOfRangeException

Will be thrown if 'radius' value equal to or less than 0.

ArgumentException

Will be thrown if 'bottomPosition' equal to 'topPosition'.

### <a id="VM_API_Pre_SolidBodyAPI_CreateSolidCylinder_VM_Managed_DAFUL_SubSystemDocument_VM_Vector_VM_Vector_System_String_"></a> CreateSolidCylinder(SubSystemDocument, Vector, Vector, string)

Create  with  builder.

```csharp
public static Obj CreateSolidCylinder(this SubSystemDocument document, Vector bottomPosition, Vector topPosition, string bodyName)

```

#### Parameters

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

The document to create the cylinder solid body.

`bottomPosition` Vector

The bottom position to create the cylinder solid body.

`topPosition` Vector

The top position to create the cylinder solid body.

`bodyName` string

The name of the . If empty, default name starts with 'BD\_' will be generated and used. If booleanOperationType argument is other than 'None', this argument must be the existing  name.

#### Returns

[Obj](VM.API.Pre.Obj.md)

The new  object created by this API.

### <a id="VM_API_Pre_SolidBodyAPI_CreateSolidSphere_VM_Managed_DAFUL_SubSystemDocument_VM_Vector_VM_Models_Pre_ExpressionValueVariable_System_String_VM_API_Pre_BooleanOperationType_System_Nullable_System_Drawing_Color__VM_Managed_SymmetricType_System_Boolean_"></a> CreateSolidSphere(SubSystemDocument, Vector, ExpressionValueVariable, string, BooleanOperationType, Color?, SymmetricType, bool)

Create  with  builder.

```csharp
[NotNull(new string[] { "document" })]
[GreaterThanZero(new string[] { "radius" })]
public static Obj CreateSolidSphere(this SubSystemDocument document, Vector centerPosition, ExpressionValueVariable radius, string bodyName = "", BooleanOperationType booleanOperationType = BooleanOperationType.None, Color? color = null, SymmetricType symmetricType = SymmetricType.None, bool isInterface = false)

```

#### Parameters

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

The document to create the sphere solid body.

`centerPosition` Vector

The center position to create the sphere solid body.

`radius` [ExpressionValueVariable](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/Pre/Data/VM.Models.Pre/Models/ExpressionValueVariable.cs)

The radius of the sphere.

`bodyName` string

The name of the . If empty, default name starts with 'BD\_' will be generated and used. If booleanOperationType argument is other than 'None', this argument must be the existing  name.

`booleanOperationType` [BooleanOperationType](VM.API.Pre.BooleanOperationType.md)

The boolean operation type. If None, new  will be created. otherwise, New sphere geometry will be merged to the existing  which has same name with 'name' argument.

`color` Color?

The color of the new sphere geometry. The default value is '0xBFAAAA'

`symmetricType` SymmetricType

The symmetric type of the new .

`isInterface` bool

'true' if it is interface body. Otherwise, 'false'.

#### Returns

[Obj](VM.API.Pre.Obj.md)

The new  object that is created by this API.

#### Exceptions

ArgumentNullException

Will be thrown if 'document' is null.

ArgumentOutOfRangeException

Will be thrown if 'radius' value equal to or less than 0.

### <a id="VM_API_Pre_SolidBodyAPI_CreateSolidSphere_VM_Managed_DAFUL_SubSystemDocument_VM_Vector_System_String_"></a> CreateSolidSphere(SubSystemDocument, Vector, string)

Create  with  builder.

```csharp
public static Obj CreateSolidSphere(this SubSystemDocument document, Vector centerPosition, string bodyName)

```

#### Parameters

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

The document to create the sphere solid body.

`centerPosition` Vector

The center position to create the sphere solid body.

`bodyName` string

The name of the . If empty, default name starts with 'BD\_' will be generated and used. If booleanOperationType argument is other than 'None', this argument must be the existing  name.

#### Returns

[Obj](VM.API.Pre.Obj.md)

The new  object created by this API.

### <a id="VM_API_Pre_SolidBodyAPI_CreateSolidTriPlate_VM_Managed_DAFUL_SubSystemDocument_VM_Vector_VM_Vector_VM_Vector_VM_Models_Pre_ExpressionValueVariable_System_String_VM_API_Pre_BooleanOperationType_System_Nullable_System_Drawing_Color__VM_Managed_SymmetricType_System_Boolean_"></a> CreateSolidTriPlate(SubSystemDocument, Vector, Vector, Vector, ExpressionValueVariable, string, BooleanOperationType, Color?, SymmetricType, bool)

Create  with  builder.

```csharp
[NotNull(new string[] { "document" })]
[GreaterThanZero(new string[] { "height" })]
public static Obj CreateSolidTriPlate(this SubSystemDocument document, Vector firstPosition, Vector secondPosition, Vector thirdPosition, ExpressionValueVariable height, string bodyName = "", BooleanOperationType booleanOperationType = BooleanOperationType.None, Color? color = null, SymmetricType symmetricType = SymmetricType.None, bool isInterface = false)

```

#### Parameters

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

The document to create the triplate solid body.

`firstPosition` Vector

The first position to create the triplate solid body.

`secondPosition` Vector

The second position to create the triplate solid body.

`thirdPosition` Vector

The third position to create the triplate solid body.

`height` [ExpressionValueVariable](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/Pre/Data/VM.Models.Pre/Models/ExpressionValueVariable.cs)

The height of the triplate.

`bodyName` string

The name of the . If empty, default name starts with 'BD\_' will be generated and used. If booleanOperationType argument is other than 'None', this argument must be the existing  name.

`booleanOperationType` [BooleanOperationType](VM.API.Pre.BooleanOperationType.md)

The boolean operation type. If None, new  will be created. otherwise, New triplate geometry will be merged to the existing  which has same name with 'name' argument.

`color` Color?

The color of the new triplate geometry. The default value is '0xBFAAAA'

`symmetricType` SymmetricType

The symmetric type of the new .

`isInterface` bool

'true' if it is interface body. Otherwise, 'false'.

#### Returns

[Obj](VM.API.Pre.Obj.md)

The new  object that is created by this API.

#### Exceptions

ArgumentNullException

Will be thrown if 'document' is null.

ArgumentOutOfRangeException

Will be thrown if 'height' value equal to or less than 0.

ArgumentException

Will be thrown if the condition of triangle's crossproduct is not met.

### <a id="VM_API_Pre_SolidBodyAPI_CreateSolidTriPlate_VM_Managed_DAFUL_SubSystemDocument_VM_Vector_VM_Vector_VM_Vector_System_String_"></a> CreateSolidTriPlate(SubSystemDocument, Vector, Vector, Vector, string)

Create  with  builder.

```csharp
public static Obj CreateSolidTriPlate(this SubSystemDocument document, Vector firstPosition, Vector secondPosition, Vector thirdPosition, string bodyName)

```

#### Parameters

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

The document to create the triplate solid body.

`firstPosition` Vector

The first position to create the triplate solid body.

`secondPosition` Vector

The second position to create the triplate solid body.

`thirdPosition` Vector

The third position to create the triplate solid body.

`bodyName` string

The name of the . If empty, default name starts with 'BD\_' will be generated and used. If booleanOperationType argument is other than 'None', this argument must be the existing  name.

#### Returns

[Obj](VM.API.Pre.Obj.md)

The new  object created by this API.

### <a id="VM_API_Pre_SolidBodyAPI_UpdateBody_VM_API_Pre_Obj_"></a> UpdateBody(Obj)

Update body.

```csharp
[NotNullObj(new string[] { "body" })]
public static void UpdateBody(this Obj body)

```

#### Parameters

`body` [Obj](VM.API.Pre.Obj.md)

The body to be updated.

#### Exceptions

ArgumentNullException

Will be thrown if 'body' arguments are empty.

ArgumentException

Will be thrown if 'body' argument is not empty and type of 'body' is not  or .