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

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

This class implements APIs for simulation.

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

#### Inheritance

object ←
[GearTrainSimulationAPI](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.API.Pre.GearTrain.GearTrainSimulationAPI.md)

#### Extension Methods

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

## Methods

### ExportDFG(GearTrainDocument, string)

Export DFS file

```csharp theme={null}
[NotNull(new string[] { "document" })]
[NotNullOrEmpty(new string[] { "targetPath" })]
public static void ExportDFG(this GearTrainDocument document, string targetPath)
```

#### Parameters

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

The [GearTrainDocument](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.DAFUL.GearTrain.GearTrainDocument.md) for exporting DFG file. If null, the active document will be used.

`targetPath` string

The file path to export DFG file exclude file extension.

#### Exceptions

ArgumentNullException

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

### ExportDFS(GearTrainDocument, string)

Export DFS file

```csharp theme={null}
[NotNull(new string[] { "document" })]
[NotNullOrEmpty(new string[] { "targetPath" })]
public static void ExportDFS(this GearTrainDocument document, string targetPath)
```

#### Parameters

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

The [GearTrainDocument](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.DAFUL.GearTrain.GearTrainDocument.md) for exporting DFS file. If null, the active document will be used.

`targetPath` string

The file path to export DFS file exclude file extension.

#### Exceptions

ArgumentNullException

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

### ExportDFSXML(GearTrainDocument, string)

Export DFSXML file

```csharp theme={null}
[NotNull(new string[] { "document" })]
[NotNullOrEmpty(new string[] { "targetPath" })]
public static void ExportDFSXML(this GearTrainDocument document, string targetPath)
```

#### Parameters

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

The [GearTrainDocument](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.DAFUL.GearTrain.GearTrainDocument.md) for exporting DFSXML file. If null, the active document will be used.

`targetPath` string

The file path to export DFSXML file exclude file extension.

#### Exceptions

ArgumentNullException

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

### ExportMotionFiles(GearTrainDocument, string, bool, bool, bool, bool)

Export motion files.

```csharp theme={null}
[NotNull(new string[] { "document" })]
[NotNullOrEmpty(new string[] { "targetPath" })]
public static void ExportMotionFiles(this GearTrainDocument document, string targetPath, bool writeDFS, bool writeXML, bool writeDFG, bool includeReferenceFiles)
```

#### Parameters

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

The [GearTrainDocument](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.DAFUL.GearTrain.GearTrainDocument.md) for exporting motion files. If null, the active document will be used.

`targetPath` string

The file path to export motion files exclude file extension.

`writeDFS` bool

The flag for whether to write on dfs or not.

`writeXML` bool

The flag for whether to write on dfsxml or not.

`writeDFG` bool

The flag for whether to write on dfg or not.

`includeReferenceFiles` bool

The flag for whether to include reference files or not.

#### Exceptions

ArgumentNullException

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

### RunSimulation(GearTrainDocument, SimulationParameter)

Run simulation.

```csharp theme={null}
[NotNull(new string[] { "document" })]
public static void RunSimulation(this GearTrainDocument document, SimulationRun.SimulationParameter simulationParameter = null)
```

#### Parameters

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

The [GearTrainDocument](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.DAFUL.GearTrain.GearTrainDocument.md) for simulate. If null, the active document will be used.

`simulationParameter` [SimulationRun](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Operations/VMOpCore/SimulationRun.cs).[SimulationParameter](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Operations/VMOpCore/SimulationRun.cs)

The simulation parameter.

#### Exceptions

ArgumentNullException

Will be thrown if 'document' argument is empty.
