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

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

This class implements APIs for Geometry.

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

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ←
[GeometryAPI](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.API.Pre.GeometryAPI.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

### ExportCAD(IDocument, string, IEnumerable\<Obj>, string)

Export the geometry.

```csharp theme={null}
[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](https://learn.microsoft.com/dotnet/api/system.string)

The file path of the geometry.

`objectList` [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)\<[Obj](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.API.Pre.Obj.md)>

The result type of the geometry.

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

The unit type of the geometry.

#### Exceptions

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

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

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

Will be thrown if the type of 'document' is not [SubSystemDocument](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.DAFUL.SubSystemDocument.md) and [PartDocument](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.DAFUL.PartDocument.md).

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

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

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

Will be thrown if the type of 'objectList' is not [SolidBody](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.DAFUL.SolidBody.md) and [Body](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.CAD.Body.md).

### ImportCAD(IDocument, string, ResultType, CadImportUnitType, bool, CadImportColorType, Color?)

Import the geometry.

```csharp theme={null}
[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](https://learn.microsoft.com/dotnet/api/system.string)

The file path of the geometry.

`resultType` [ResultType](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.API.Pre.ResultType.md)

The result type of the geometry.

`unused` Document3D.CadImportUnitType

This parameter is unused.

`useHealing` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

The flag of use healing of geometry.

`colorType` Document3D.CadImportColorType

The color type of the geometry.

`color` [Color](https://learn.microsoft.com/dotnet/api/system.drawing.color)?

The color of the geometry.

#### Exceptions

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

Will be thrown if 'document' is null.

[FileNotFoundException](https://learn.microsoft.com/dotnet/api/system.io.filenotfoundexception)

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

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

Will be thrown if the type of 'document' is not [SubSystemDocument](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.DAFUL.SubSystemDocument.md) and [PartDocument](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.DAFUL.PartDocument.md).

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

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

### ReplaceCAD(IDocument, string, ResultType, CadImportUnitType, bool, CadImportColorType, Color?, bool, string\[])

Replace the geometry.

```csharp theme={null}
[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](https://learn.microsoft.com/dotnet/api/system.string)

The file path of the geometry.

`resultType` [ResultType](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.API.Pre.ResultType.md)

The result type of the geometry.

`unused` Document3D.CadImportUnitType

This parameter is unused.

`useHealing` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

The flag of use healing of geometry.

`colorType` Document3D.CadImportColorType

The color type of the geometry.

`color` [Color](https://learn.microsoft.com/dotnet/api/system.drawing.color)?

The color of the geometry.

`replaceAllGeometries` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

The flag of replace all geometries of geometry.

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

The attributes of geometry.

#### Exceptions

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

Will be thrown if 'document' is null.

[FileNotFoundException](https://learn.microsoft.com/dotnet/api/system.io.filenotfoundexception)

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

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

Will be thrown if the type of 'document' is not [SubSystemDocument](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.DAFUL.SubSystemDocument.md) and [PartDocument](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.DAFUL.PartDocument.md).

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

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