    

 ## On this page

  

 

 # Class GeometryAPI

 Last update: 09.03.2026 

<a id="VM_API_Pre_GeometryAPI"></a>

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

This class implements APIs for Geometry.

```csharp
public static class GeometryAPI

```

#### Inheritance

object ← [GeometryAPI](VM.API.Pre.GeometryAPI.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_GeometryAPI_ExportCAD_VM_Models_Pre_IDocument_System_String_System_Collections_Generic_IEnumerable_VM_API_Pre_Obj__System_String_"></a> ExportCAD(IDocument, string, IEnumerable&lt;Obj&gt;, string)

Export the geometry.

```csharp
[NotNull(new string[] { "document", "objectList" })]
[NotNullOrEmpty(new string[] { "filePath" })]
public static void ExportCAD(this IDocument document, string filePath, IEnumerable<Obj> objectList, string value)

```

#### Parameters

`document` IDocument

The document to export the geometry.

`filePath` string

The file path of the geometry.

`objectList` IEnumerable&lt;[Obj](VM.API.Pre.Obj.md)&gt;

The result type of the geometry.

`value` string

The unit type of the geometry.

#### Exceptions

ArgumentNullException

Will be thrown if 'document', 'filePath' argument is null.

ArgumentException

Will be thrown if the type of 'document' is not  and .

ArgumentException

Will be thrown if the exetension of 'filePath' is not 'sab', '.sat', 'CATPart', 'CATProduct', 'x\_t', 'x\_b', 'stp', 'step'.

ArgumentException

Will be thrown if the type of 'objectList' is not  and .

### <a id="VM_API_Pre_GeometryAPI_ImportCAD_VM_Models_Pre_IDocument_System_String_VM_API_Pre_ResultType_VM_Managed_Document3D_CadImportUnitType_System_Boolean_VM_Managed_Document3D_CadImportColorType_System_Nullable_System_Drawing_Color__"></a> ImportCAD(IDocument, string, ResultType, CadImportUnitType, bool, CadImportColorType, Color?)

Import the geometry.

```csharp
[NotNull(new string[] { "document" })]
[ExistFile(new string[] { "filePath" })]
public static void ImportCAD(this IDocument document, string filePath, ResultType resultType = ResultType.Default, Document3D.CadImportUnitType unused = CadImportUnitType.Auto, bool useHealing = true, Document3D.CadImportColorType colorType = CadImportColorType.Default, Color? color = null)

```

#### Parameters

`document` IDocument

The document to import the geometry.

`filePath` string

The file path of the geometry.

`resultType` [ResultType](VM.API.Pre.ResultType.md)

The result type of the geometry.

`unused` Document3D.CadImportUnitType

This parameter is unused.

`useHealing` bool

The flag of use healing of geometry.

`colorType` Document3D.CadImportColorType

The color type of the geometry.

`color` Color?

The color of the geometry.

#### Exceptions

ArgumentNullException

Will be thrown if 'document' is null.

FileNotFoundException

Will be thrown if 'filePath' file is not exist.

ArgumentException

Will be thrown if the type of 'document' is not  and .

ArgumentException

Will be thrown if the exetension of 'filePath' is not 'sab', '.sat', 'CATPart', 'CATProduct', 'x\_t', 'x\_b', 'stp', 'step'.

### <a id="VM_API_Pre_GeometryAPI_ReplaceCAD_VM_Models_Pre_IDocument_System_String_VM_API_Pre_ResultType_VM_Managed_Document3D_CadImportUnitType_System_Boolean_VM_Managed_Document3D_CadImportColorType_System_Nullable_System_Drawing_Color__System_Boolean_System_String___"></a> ReplaceCAD(IDocument, string, ResultType, CadImportUnitType, bool, CadImportColorType, Color?, bool, string\[\])

Replace the geometry.

```csharp
[NotNull(new string[] { "document" })]
[ExistFile(new string[] { "filePath" })]
public static void ReplaceCAD(this IDocument document, string filePath, ResultType resultType = ResultType.Default, Document3D.CadImportUnitType unused = CadImportUnitType.Auto, bool useHealing = true, Document3D.CadImportColorType colorType = CadImportColorType.Default, Color? color = null, bool replaceAllGeometries = true, string[] attributes = null)

```

#### Parameters

`document` IDocument

The document to replace the geometry.

`filePath` string

The file path of the geometry.

`resultType` [ResultType](VM.API.Pre.ResultType.md)

The result type of the geometry.

`unused` Document3D.CadImportUnitType

This parameter is unused.

`useHealing` bool

The flag of use healing of geometry.

`colorType` Document3D.CadImportColorType

The color type of the geometry.

`color` Color?

The color of the geometry.

`replaceAllGeometries` bool

The flag of replace all geometries of geometry.

`attributes` string\[\]

The attributes of geometry.

#### Exceptions

ArgumentNullException

Will be thrown if 'document' is null.

FileNotFoundException

Will be thrown if 'filePath' file is not exist.

ArgumentException

Will be thrown if the type of 'document' is not  and .

ArgumentException

Will be thrown if the exetension of 'filePath' is not 'sab', '.sat', 'CATPart', 'CATProduct', 'x\_t', 'x\_b', 'stp', 'step'.