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

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 scenario class.

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

#### Inheritance

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

### CreateSimulationScenarioForActivate(SubSystemDocument, Obj, ExpressionValueVariable?, string, Sensor, Obj?, Sign, ScenarioActivateType, Motion)

Create [Scenario](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.Simulation.Scenario.md).

```csharp theme={null}
[NotNull(new string[] { "document" })]
[NotNullObj(new string[] { "target" })]
public static Obj CreateSimulationScenarioForActivate(this SubSystemDocument document, Obj target, ExpressionValueVariable? referenceValue = null, string name = "", Scenario.Sensor sensorType = Sensor.Time, Obj? function = null, Scenario.Sign sign = Sign.GreaterAndEqual, ScenarioActivateType eventType = ScenarioActivateType.Activate, Scenario.Motion subTarget = Motion.None)
```

#### Parameters

`document` SubSystemDocument

The document to create the simulation scenario.

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

The enable target of the simulation scenario.

`referenceValue` ExpressionValueVariable?

The value of the simulation scenario.

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

The name of the simulation scenario.

`sensorType` Scenario.Sensor

The sensor type of the simulation scenario.

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

The function of the simulation scenario.

`sign` Scenario.Sign

The sign type of the simulation scenario.

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

The action type of the simulation scenario.

`subTarget` Scenario.Motion

The sub target of the simulation scenario.

#### Returns

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

The new [Scenario](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.Simulation.Scenario.md) object that is created by this API.

#### Exceptions

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

Will be thrown if 'document', 'target' is null.

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

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

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

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

### CreateSimulationScenarioForBody(SubSystemDocument, Obj, ExpressionValueVariable?, string, Sensor, Obj?, Sign, ScenarioBodyType)

Create [Scenario](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.Simulation.Scenario.md).

```csharp theme={null}
[NotNull(new string[] { "document" })]
[NotNullObj(new string[] { "target" })]
public static Obj CreateSimulationScenarioForBody(this SubSystemDocument document, Obj target, ExpressionValueVariable? referenceValue = null, string name = "", Scenario.Sensor sensorType = Sensor.Time, Obj? function = null, Scenario.Sign sign = Sign.GreaterAndEqual, ScenarioBodyType eventType = ScenarioBodyType.SetToRigidBody)
```

#### Parameters

`document` SubSystemDocument

The document to create the simulation scenario.

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

The enable target of the simulation scenario.

`referenceValue` ExpressionValueVariable?

The value of the simulation scenario.

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

The name of the simulation scenario.

`sensorType` Scenario.Sensor

The sensor type of the simulation scenario.

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

The function of the simulation scenario.

`sign` Scenario.Sign

The sign type of the simulation scenario.

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

The action type of the simulation scenario.

#### Returns

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

The new [Scenario](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.Simulation.Scenario.md) object that is created by this API.

#### Exceptions

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

Will be thrown if 'document', 'target' is null.

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

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

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

Will be thrown if the type of 'target' is not [IBodyAnalysisType](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.DAFUL.IBodyAnalysisType.md) or if the type of target's analysisType is not Rigid.

### CreateSimulationScenarioForFile(SubSystemDocument, string, ExpressionValueVariable?, string, Sensor, Obj?, Sign, ScenarioFileType)

Create [Scenario](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.Simulation.Scenario.md).

```csharp theme={null}
[NotNull(new string[] { "document" })]
[ExistFile(new string[] { "targetFilePath" })]
public static Obj CreateSimulationScenarioForFile(this SubSystemDocument document, string targetFilePath, ExpressionValueVariable? referenceValue = null, string name = "", Scenario.Sensor sensorType = Sensor.Time, Obj? function = null, Scenario.Sign sign = Sign.GreaterAndEqual, ScenarioFileType eventType = ScenarioFileType.ExportIcfFile)
```

#### Parameters

`document` SubSystemDocument

The document to create the simulation scenario.

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

The ICF file path of the simulation scenario.

`referenceValue` ExpressionValueVariable?

The value of the simulation scenario.

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

The name of the simulation scenario.

`sensorType` Scenario.Sensor

The sensor type of the simulation scenario.

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

The function of the simulation scenario.

`sign` Scenario.Sign

The sign type of the simulation scenario.

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

The action type of the simulation scenario.

#### Returns

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

The new [Scenario](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.Simulation.Scenario.md) object that is created by this API.

#### Exceptions

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

Will be thrown if 'document' is null.

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

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

### CreateSimulationScenarioForOutput(SubSystemDocument, ExpressionValueVariable?, ExpressionValueVariable?, string, Sensor, Obj?, Sign, ScenarioOutputType)

Create [Scenario](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.Simulation.Scenario.md).

```csharp theme={null}
[NotNull(new string[] { "document" })]
public static Obj CreateSimulationScenarioForOutput(this SubSystemDocument document, ExpressionValueVariable? target = null, ExpressionValueVariable? referenceValue = null, string name = "", Scenario.Sensor sensorType = Sensor.Time, Obj? function = null, Scenario.Sign sign = Sign.GreaterAndEqual, ScenarioOutputType eventType = ScenarioOutputType.SetMaximumStepsize)
```

#### Parameters

`document` SubSystemDocument

The document to create the simulation scenario.

`target` ExpressionValueVariable?

The action value of the simulation scenario.

`referenceValue` ExpressionValueVariable?

The value of the simulation scenario.

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

The name of the simulation scenario.

`sensorType` Scenario.Sensor

The sensor type of the simulation scenario.

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

The function of the simulation scenario.

`sign` Scenario.Sign

The sign type of the simulation scenario.

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

The action type of the simulation scenario.

#### Returns

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

The new [Scenario](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.Simulation.Scenario.md) object that is created by this API.

#### Exceptions

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

Will be thrown if 'document' is null.

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

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

### CreateSimulationScenarioForStop(SubSystemDocument, ExpressionValueVariable?, string, Sensor, Obj?, Sign)

Create [Scenario](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.Simulation.Scenario.md).

```csharp theme={null}
[NotNull(new string[] { "document" })]
public static Obj CreateSimulationScenarioForStop(this SubSystemDocument document, ExpressionValueVariable? referenceValue = null, string name = "", Scenario.Sensor sensorType = Sensor.Time, Obj? function = null, Scenario.Sign sign = Sign.GreaterAndEqual)
```

#### Parameters

`document` SubSystemDocument

The document to create the simulation scenario.

`referenceValue` ExpressionValueVariable?

The value of the simulation scenario.

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

The name of the simulation scenario.

`sensorType` Scenario.Sensor

The sensor type of the simulation scenario.

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

The function of the simulation scenario.

`sign` Scenario.Sign

The sign type of the simulation scenario.

#### Returns

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

The new [Scenario](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.Simulation.Scenario.md) object that is created by this API.

#### Exceptions

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

Will be thrown if 'document' is null.

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

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