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

Namespace: [VM.Managed.DAFUL.Operation.Util](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.DAFUL.Operation.Util)\
Assembly: VMOpCore.dll

The utility class for the sub-entity creation.

```csharp theme={null}
public class CreateSubEntity
```

#### Inheritance

object ←
[CreateSubEntity](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.DAFUL.Operation.Util.CreateSubEntity.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_)

## Constructors

### CreateSubEntity()

```csharp theme={null}
public CreateSubEntity()
```

## Methods

### CreateArray(Document3D, int, bool)

Create the array.

```csharp theme={null}
public static Array CreateArray(Document3D document, int size, bool isInterface)
```

#### Parameters

`document` Document3D

The document.

`size` int

The number of array size.

`isInterface` bool

The flag of interface.

#### Returns

[Array](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDSP/Array.cs)

The new array.

### CreateArray(Document3D, int, bool, string)

Create the array.

```csharp theme={null}
public static Array CreateArray(Document3D activeDocument, int nSize, bool bInterface, string strName)
```

#### Parameters

`activeDocument` Document3D

The active document.

`nSize` int

The number of array size.

`bInterface` bool

The flag of interface.

`strName` string

The array name.

#### Returns

[Array](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDSP/Array.cs)

The new array.

### CreateDifferential1Equation(Document3D, Function, double, double, FunctionEquType, string)

Create the variable equation.

```csharp theme={null}
public static Differential1 CreateDifferential1Equation(Document3D activeDocument, Function function, double initialDisplacement, double initialVelocity, EquationFunctionDiff.FunctionEquType differentialFunctionType, string name)
```

#### Parameters

`activeDocument` Document3D

The active document.

`function` [Function](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDSB/Function.cs)

The function.

`initialDisplacement` double

The initial value.

`initialVelocity` double

The initial velocity.

`differentialFunctionType` [EquationFunctionDiff](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDEq/Differential1.cs).[FunctionEquType](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDEq/Differential1.cs)

The differential function type.

`name` string

The variable equation name.

#### Returns

[Differential1](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDEq/Differential1.cs)

The new variable equation.

### CreateDifferential1Equation(Document3D, UserSubroutine, double, double, FunctionEquType, string)

Create the variable equation.

```csharp theme={null}
public static Differential1 CreateDifferential1Equation(Document3D activeDocument, UserSubroutine userSubroutine, double initialDisplacement, double initialVelocity, EquationFunctionDiff.FunctionEquType differentialFunctionType, string name)
```

#### Parameters

`activeDocument` Document3D

The active document.

`userSubroutine` [UserSubroutine](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDSP/UserSubroutine.cs)

The function.

`initialDisplacement` double

The initial value.

`initialVelocity` double

The initial velocity.

`differentialFunctionType` [EquationFunctionDiff](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDEq/Differential1.cs).[FunctionEquType](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDEq/Differential1.cs)

The differential function type.

`name` string

The variable equation name.

#### Returns

[Differential1](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDEq/Differential1.cs)

The new variable equation.

### CreateDifferential2Equation(Document3D, Function, double, double, FunctionEquType, string)

Create the variable equation.

```csharp theme={null}
public static Differential2 CreateDifferential2Equation(Document3D activeDocument, Function function, double initialDisplacement, double initialVelocity, EquationFunctionDiff.FunctionEquType differentialFunctionType, string name)
```

#### Parameters

`activeDocument` Document3D

The active document.

`function` [Function](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDSB/Function.cs)

The function.

`initialDisplacement` double

The initial value.

`initialVelocity` double

The initial velocity.

`differentialFunctionType` [EquationFunctionDiff](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDEq/Differential1.cs).[FunctionEquType](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDEq/Differential1.cs)

The differential function type.

`name` string

The variable equation name.

#### Returns

[Differential2](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDEq/Differential2.cs)

The new variable equation.

### CreateDifferential2Equation(Document3D, UserSubroutine, double, double, FunctionEquType, string)

Create the variable equation.

```csharp theme={null}
public static Differential2 CreateDifferential2Equation(Document3D activeDocument, UserSubroutine userSubroutine, double initialDisplacement, double initialVelocity, EquationFunctionDiff.FunctionEquType differentialFunctionType, string name)
```

#### Parameters

`activeDocument` Document3D

The active document.

`userSubroutine` [UserSubroutine](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDSP/UserSubroutine.cs)

The function.

`initialDisplacement` double

The initial value.

`initialVelocity` double

The initial velocity.

`differentialFunctionType` [EquationFunctionDiff](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDEq/Differential1.cs).[FunctionEquType](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDEq/Differential1.cs)

The differential function type.

`name` string

The variable equation name.

#### Returns

[Differential2](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDEq/Differential2.cs)

The new variable equation.

### CreateFunction(Document3D, string, IArgument\[], string, bool)

Create the function.

```csharp theme={null}
public static Function CreateFunction(Document3D document, string expression, IArgument[] arguments, string name, bool getNewEntityName = false)
```

#### Parameters

`document` Document3D

`expression` string

`arguments` IArgument\[]

`name` string

`getNewEntityName` bool

Flag for creating a new entity if there is already an entity with the same name

#### Returns

[Function](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDSB/Function.cs)

### CreateFunction(Document3D, string, string)

Create the function.

```csharp theme={null}
public static Function CreateFunction(Document3D document, string expression, string name)
```

#### Parameters

`document` Document3D

`expression` string

`name` string

#### Returns

[Function](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDSB/Function.cs)

### CreateFunctionSimple(Document, string, bool, string, bool)

Create the function.

```csharp theme={null}
public static Function CreateFunctionSimple(Document document, string strExpression, bool bInterface, string strName, bool getNewEntityName = false)
```

#### Parameters

`document` Document

The active document.

`strExpression` string

The expression of function.

`bInterface` bool

The flag of interface.

`strName` string

The function name.

`getNewEntityName` bool

Flag for creating a new entity if there is already an entity with the same name

#### Returns

[Function](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDSB/Function.cs)

The new function.

### CreateFunctionSimple(Document3D, string, bool, string, string)

Create the function.

```csharp theme={null}
public static Function CreateFunctionSimple(Document3D activeDocument, string strExpression, bool bInterface, string strName, string strMatchName)
```

#### Parameters

`activeDocument` Document3D

The active document.

`strExpression` string

The expression of function.

`bInterface` bool

The flag of interface.

`strName` string

The function name.

`strMatchName` string

Name of the STR match.

#### Returns

[Function](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDSB/Function.cs)

The new function.

### CreateFunctionWithArguments(Document, string, IEnumerable\<IArgument>, bool, string, bool)

Create the function.

```csharp theme={null}
public static Function CreateFunctionWithArguments(Document document, string strExpression, IEnumerable<IArgument> lstArgument, bool bInterface, string strName, bool getNewEntityName = false)
```

#### Parameters

`document` Document

The active document.

`strExpression` string

The expression of function.

`lstArgument` IEnumerable\<IArgument>

The list of argument.

`bInterface` bool

The flag of interface.

`strName` string

The function name.

`getNewEntityName` bool

Flag for creating a new entity if there is already an entity with the same name

#### Returns

[Function](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDSB/Function.cs)

The new function.

### CreateFunctionWithArguments(Document, string, IEnumerable\<(string, IArgument)>, bool, string, bool)

Create the function with argument for python.

```csharp theme={null}
public static Function CreateFunctionWithArguments(Document document, string strExpression, IEnumerable<(string, IArgument)> lstArgument, bool bInterface, string strName, bool getNewEntityName = false)
```

#### Parameters

`document` Document

The active document.

`strExpression` string

The expression of function.

`lstArgument` IEnumerable\<(string, IArgument)>

The list of argument.

`bInterface` bool

The flag of interface.

`strName` string

The function name.

`getNewEntityName` bool

Flag for creating a new entity if there is already an entity with the same name

#### Returns

[Function](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDSB/Function.cs)

The new function.

### CreateGroup(Document3D, string)

Create the Group.

```csharp theme={null}
public static Group CreateGroup(Document3D docSub, string strName)
```

#### Parameters

`docSub` Document3D

The active document

`strName` string

The group name

#### Returns

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

### CreateScenario(Document, Sensor, Sign, Action, double, ObjectBase, double, string, ObjectBase, Motion, string)

Create scenario

```csharp theme={null}
public static Scenario CreateScenario(Document document, Scenario.Sensor sensor, Scenario.Sign sign, Scenario.Action action, double dActionValue, ObjectBase function, double dValue, string strICFPath, ObjectBase objEnableTarget, Scenario.Motion targetOfMotion, string strPrefixName)
```

#### Parameters

`document` Document

The document

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

The sensor

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

The sign

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

The action

`dActionValue` double

The action value

`function` ObjectBase

The function

`dValue` double

The value

`strICFPath` string

The icf path

`objEnableTarget` ObjectBase

The enable target

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

The motion

`strPrefixName` string

The prefix name

#### Returns

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

### CreateSpline(Document3D, IEnumerable\<DataPoint>, string)

```csharp theme={null}
public static Spline CreateSpline(Document3D document, IEnumerable<DataPoint> dataPoints, string name)
```

#### Parameters

`document` Document3D

The active document.

`dataPoints` IEnumerable\<DataPoint>

The spline data

`name` string

The spline name.

#### Returns

[Spline](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDSB/Spline.cs)

The new spline.

### CreateSpline(Document3D, SplineValue, string)

```csharp theme={null}
public static Spline CreateSpline(Document3D document, SplineValue splineValue, string name)
```

#### Parameters

`document` Document3D

The active document.

`splineValue` [SplineValue](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDSB/Spline.cs)

The spline value

`name` string

The spline name.

#### Returns

[Spline](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDSB/Spline.cs)

The new spline.

### CreateSplineFromFile(Document3D, string, string)

```csharp theme={null}
public static Spline CreateSplineFromFile(Document3D activeDocument, string strDataFilePath, string strName)
```

#### Parameters

`activeDocument` Document3D

The active document.

`strDataFilePath` string

The path of spline data file.

`strName` string

The spline name.

#### Returns

[Spline](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDSB/Spline.cs)

The new spline.

### CreateSplineFromValue(Document3D, List\<string\[]>, string, bool)

```csharp theme={null}
public static Spline CreateSplineFromValue(Document3D activeDocument, List<string[]> points, string strName, bool getNewEntityName = false)
```

#### Parameters

`activeDocument` Document3D

The active document.

`points` List\<string\[]>

The data of spline value.

`strName` string

The spline name.

`getNewEntityName` bool

Flag for creating a new entity if there is already an entity with the same name

#### Returns

[Spline](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDSB/Spline.cs)

The new spline.

### CreateStringValue(Document3D, string, bool)

Create the stringValue.

```csharp theme={null}
public static StringValue CreateStringValue(Document3D document, string stringValue, bool isInterface)
```

#### Parameters

`document` Document3D

The document.

`stringValue` string

The string value.

`isInterface` bool

The flag of interface.

#### Returns

[StringValue](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDSP/StringValue.cs)

The new string value.

### CreateStringValue(Document3D, string, bool, string)

Create the stringValue.

```csharp theme={null}
public static StringValue CreateStringValue(Document3D activeDocument, string stringValue, bool bInterface, string strName)
```

#### Parameters

`activeDocument` Document3D

The active document.

`stringValue` string

The number of array size.

`bInterface` bool

The flag of interface.

`strName` string

The array name.

#### Returns

[StringValue](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDSP/StringValue.cs)

The new array.

### CreateUserSubroutine(Document3D, string, string, int, string, bool, string)

Create the user-subroutine.

```csharp theme={null}
public static UserSubroutine CreateUserSubroutine(Document3D document, string dllName, string functionName, int resultValue, string expression, bool @interface, string name)
```

#### Parameters

`document` Document3D

The active document.

`dllName` string

The DLL file name.

`functionName` string

The function name.

`resultValue` int

The number of result value.

`expression` string

The expression of user-subroutine.

`interface` bool

The flag of interface.

`name` string

The user-subroutine name.

#### Returns

[UserSubroutine](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDSP/UserSubroutine.cs)

The new user-subroutine.

### CreateUserSubroutineWithArguments(Document, string, string, int, string, IEnumerable\<IArgument>, bool, string, bool)

Create the user-subroutine.

```csharp theme={null}
public static UserSubroutine CreateUserSubroutineWithArguments(Document document, string dllName, string functionName, int resultValue, string expression, IEnumerable<IArgument> arguments, bool @interface, string name, bool addToDocument = true)
```

#### Parameters

`document` Document

The active document.

`dllName` string

The DLL file name.

`functionName` string

The function name.

`resultValue` int

The number of result value.

`expression` string

The expression of user-subroutine.

`arguments` IEnumerable\<IArgument>

The list of argument.

`interface` bool

The flag of interface.

`name` string

The user-subroutine name.

`addToDocument` bool

Flag for add created element to document.

#### Returns

[UserSubroutine](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDSP/UserSubroutine.cs)

The new user-subroutine.

### CreateVariableEquation(Document3D, Function, double, string)

Create the variable equation.

```csharp theme={null}
public static VariableEq CreateVariableEquation(Document3D activeDocument, Function function, double dInitialValue, string strName)
```

#### Parameters

`activeDocument` Document3D

The active document.

`function` [Function](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDSB/Function.cs)

The function.

`dInitialValue` double

The intial value.

`strName` string

The variable equation name.

#### Returns

[VariableEq](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDEq/VariableEq.cs)

The new variable equation.

### CreateVariableEquation(Document3D, UserSubroutine, double, string)

Create the variable equation.

```csharp theme={null}
public static VariableEq CreateVariableEquation(Document3D document, UserSubroutine userSubroutine, double initialValue, string name)
```

#### Parameters

`document` Document3D

The active document.

`userSubroutine` [UserSubroutine](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDSP/UserSubroutine.cs)

The UserSubroutine.

`initialValue` double

The intial value.

`name` string

The variable equation name.

#### Returns

[VariableEq](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDEq/VariableEq.cs)

The new variable equation.
