    

 ## On this page

  

 

 # Class SimulationAPI

 Last update: 09.03.2026 

<a id="VM_API_Pre_SimulationAPI"></a>

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

This class implements APIs for simulation.

```csharp
public static class SimulationAPI

```

#### Inheritance

object ← [SimulationAPI](VM.API.Pre.SimulationAPI.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_SimulationAPI_ExportDFG_VM_Managed_DAFUL_DocumentAnalysis_System_String_"></a> ExportDFG(DocumentAnalysis, string)

Export DFG file

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

```

#### Parameters

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

The  for exporting DFG file. If null, the active document will be used.

`targetPath` string

The file path to export DFG file exclude file extension.

### <a id="VM_API_Pre_SimulationAPI_ExportDFS_VM_Managed_DAFUL_DocumentAnalysis_System_String_"></a> ExportDFS(DocumentAnalysis, string)

Export DFS file

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

```

#### Parameters

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

The  for exporting DFS file. If null, the active document will be used.

`targetPath` string

The file path to export DFS file exclude file extension.

### <a id="VM_API_Pre_SimulationAPI_ExportDFSXML_VM_Managed_DAFUL_DocumentAnalysis_System_String_"></a> ExportDFSXML(DocumentAnalysis, string)

Export DFSXML file

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

```

#### Parameters

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

The  for exporting DFSXML file. If null, the active document will be used.

`targetPath` string

The file path to export DFSXML file exclude file extension.

### <a id="VM_API_Pre_SimulationAPI_ExportMotionFiles_VM_Managed_DAFUL_DocumentAnalysis_System_String_System_Boolean_System_Boolean_System_Boolean_System_Boolean_"></a> ExportMotionFiles(DocumentAnalysis, string, bool, bool, bool, bool)

Export motion files.

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

```

#### Parameters

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

The  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.

### <a id="VM_API_Pre_SimulationAPI_RunSimulation_VM_Managed_DAFUL_DocumentAnalysis_VM_Managed_DAFUL_Operation_SimulationRun_SimulationParameter_"></a> RunSimulation(DocumentAnalysis, SimulationParameter)

Run simulation.

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

```

#### Parameters

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

The  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.

### <a id="VM_API_Pre_SimulationAPI_SetAutoPostRunner_VM_Managed_DAFUL_SubSystemDocument_System_Boolean_"></a> SetAutoPostRunner(SubSystemDocument, bool)

Sets the solver commands.

```csharp
public static void SetAutoPostRunner(this SubSystemDocument subSystemDocument, bool autoPostRunner)

```

#### Parameters

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

The document to set the solver commands.

`autoPostRunner` bool

The flag of auto post runner.

### <a id="VM_API_Pre_SimulationAPI_SetDynamicNumericalDamping_VM_Managed_DAFUL_SubSystemDocument_System_Double_"></a> SetDynamicNumericalDamping(SubSystemDocument, double)

Sets the dynamic numerical damping.

```csharp
public static void SetDynamicNumericalDamping(this SubSystemDocument subSystemDocument, double numericalDamping)

```

#### Parameters

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

The document to set the dynamic numerical damping.

`numericalDamping` double

The value of numerical damping.

### <a id="VM_API_Pre_SimulationAPI_SetSolverCommands_VM_Managed_DAFUL_SubSystemDocument_System_String_"></a> SetSolverCommands(SubSystemDocument, string)

Sets the solver commands.

```csharp
public static void SetSolverCommands(this SubSystemDocument subSystemDocument, string commands)

```

#### Parameters

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

The document to set the solver commands.

`commands` string

The value of solver commands.

### <a id="VM_API_Pre_SimulationAPI_SetStaticNumericalDamping_VM_Managed_DAFUL_SubSystemDocument_System_Double_"></a> SetStaticNumericalDamping(SubSystemDocument, double)

Sets the static numerical damping.

```csharp
public static void SetStaticNumericalDamping(this SubSystemDocument subSystemDocument, double numericalDamping)

```

#### Parameters

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

The document to set the static numerical damping.

`numericalDamping` double

The value of numerical damping.

### <a id="VM_API_Pre_SimulationAPI_SetThermalNumericalDamping_VM_Managed_DAFUL_SubSystemDocument_System_Double_"></a> SetThermalNumericalDamping(SubSystemDocument, double)

Sets the thermal numerical damping.

```csharp
public static void SetThermalNumericalDamping(this SubSystemDocument subSystemDocument, double numericalDamping)

```

#### Parameters

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

The document to set the thermal numerical damping.

`numericalDamping` double

The value of numerical damping.