    

 ## On this page

  

 

 # Class CreateSubEntity

 Last update: 16.07.2025 

Namespace: [VM.Managed.DAFUL.Operation.Util](VM.Managed.DAFUL.Operation.Util.md)  
Assembly: VMOpCore.dll

The utility class for the sub-entity creation.

```csharp
public class CreateSubEntity

```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ← [CreateSubEntity](VM.Managed.DAFUL.Operation.Util.CreateSubEntity.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_)

## Constructors

### CreateSubEntity()

```csharp
public CreateSubEntity()

```

## Methods

### CreateArray(Document3D, int, bool)

Create the array.

```csharp
public static Array CreateArray(Document3D document, int size, bool isInterface)

```

#### Parameters

`document` Document3D

The document.

`size` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The number of array size.

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

The flag of interface.

#### Returns

Array

The new array.

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

Create the array.

```csharp
public static Array CreateArray(Document3D activeDocument, int nSize, bool bInterface, string strName)

```

#### Parameters

`activeDocument` Document3D

The active document.

`nSize` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The number of array size.

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

The flag of interface.

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

The array name.

#### Returns

Array

The new array.

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

Create the variable equation.

```csharp
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

The function.

`initialDisplacement` [double](https://learn.microsoft.com/dotnet/api/system.double)

The initial value.

`initialVelocity` [double](https://learn.microsoft.com/dotnet/api/system.double)

The initial velocity.

`differentialFunctionType` EquationFunctionDiff.FunctionEquType

The differential function type.

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

The variable equation name.

#### Returns

Differential1

The new variable equation.

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

Create the variable equation.

```csharp
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

The function.

`initialDisplacement` [double](https://learn.microsoft.com/dotnet/api/system.double)

The initial value.

`initialVelocity` [double](https://learn.microsoft.com/dotnet/api/system.double)

The initial velocity.

`differentialFunctionType` EquationFunctionDiff.FunctionEquType

The differential function type.

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

The variable equation name.

#### Returns

Differential1

The new variable equation.

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

Create the variable equation.

```csharp
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

The function.

`initialDisplacement` [double](https://learn.microsoft.com/dotnet/api/system.double)

The initial value.

`initialVelocity` [double](https://learn.microsoft.com/dotnet/api/system.double)

The initial velocity.

`differentialFunctionType` EquationFunctionDiff.FunctionEquType

The differential function type.

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

The variable equation name.

#### Returns

Differential2

The new variable equation.

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

Create the variable equation.

```csharp
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

The function.

`initialDisplacement` [double](https://learn.microsoft.com/dotnet/api/system.double)

The initial value.

`initialVelocity` [double](https://learn.microsoft.com/dotnet/api/system.double)

The initial velocity.

`differentialFunctionType` EquationFunctionDiff.FunctionEquType

The differential function type.

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

The variable equation name.

#### Returns

Differential2

The new variable equation.

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

Create the function.

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

```

#### Parameters

`document` Document3D

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

`arguments` IArgument\[\]

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

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

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

#### Returns

Function

### CreateFunction(Document3D, string, string)

Create the function.

```csharp
public static Function CreateFunction(Document3D document, string expression, string name)

```

#### Parameters

`document` Document3D

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

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

#### Returns

Function

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

Create the function.

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

```

#### Parameters

`document` Document

The active document.

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

The expression of function.

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

The flag of interface.

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

The function name.

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

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

#### Returns

Function

The new function.

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

Create the function.

```csharp
public static Function CreateFunctionSimple(Document3D activeDocument, string strExpression, bool bInterface, string strName, string strMatchName)

```

#### Parameters

`activeDocument` Document3D

The active document.

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

The expression of function.

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

The flag of interface.

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

The function name.

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

Name of the STR match.

#### Returns

Function

The new function.

### CreateFunctionWithArguments(Document, string, IEnumerable&lt;IArgument&gt;, bool, string, bool)

Create the function.

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

The expression of function.

`lstArgument` [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)&lt;IArgument&gt;

The list of argument.

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

The flag of interface.

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

The function name.

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

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

#### Returns

Function

The new function.

### CreateFunctionWithArguments(Document, string, IEnumerable&lt;(string, IArgument)&gt;, bool, string, bool)

Create the function with argument for python.

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

The expression of function.

`lstArgument` [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)&lt;([string](https://learn.microsoft.com/dotnet/api/system.string), IArgument)&gt;

The list of argument.

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

The flag of interface.

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

The function name.

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

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

#### Returns

Function

The new function.

### CreateGroup(Document3D, string)

Create the Group.

```csharp
public static Group CreateGroup(Document3D docSub, string strName)

```

#### Parameters

`docSub` Document3D

The active document

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

The group name

#### Returns

Group

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

Create scenario

```csharp
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.Sensor

The sensor

`sign` Scenario.Sign

The sign

`action` Scenario.Action

The action

`dActionValue` [double](https://learn.microsoft.com/dotnet/api/system.double)

The action value

`function` ObjectBase

The function

`dValue` [double](https://learn.microsoft.com/dotnet/api/system.double)

The value

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

The icf path

`objEnableTarget` ObjectBase

The enable target

`targetOfMotion` Scenario.Motion

The motion

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

The prefix name

#### Returns

Scenario

### CreateSpline(Document3D, IEnumerable&lt;DataPoint&gt;, string)

```csharp
public static Spline CreateSpline(Document3D document, IEnumerable<DataPoint> dataPoints, string name)

```

#### Parameters

`document` Document3D

The active document.

`dataPoints` [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)&lt;DataPoint&gt;

The spline data

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

The spline name.

#### Returns

Spline

The new spline.

### CreateSpline(Document3D, SplineValue, string)

```csharp
public static Spline CreateSpline(Document3D document, SplineValue splineValue, string name)

```

#### Parameters

`document` Document3D

The active document.

`splineValue` SplineValue

The spline value

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

The spline name.

#### Returns

Spline

The new spline.

### CreateSplineFromFile(Document3D, string, string)

```csharp
public static Spline CreateSplineFromFile(Document3D activeDocument, string strDataFilePath, string strName)

```

#### Parameters

`activeDocument` Document3D

The active document.

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

The path of spline data file.

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

The spline name.

#### Returns

Spline

The new spline.

### CreateSplineFromValue(Document3D, List&lt;string\[\]&gt;, string, bool)

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

```

#### Parameters

`activeDocument` Document3D

The active document.

`points` [List](https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)&lt;[string](https://learn.microsoft.com/dotnet/api/system.string)\[\]&gt;

The data of spline value.

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

The spline name.

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

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

#### Returns

Spline

The new spline.

### CreateStringValue(Document3D, string, bool)

Create the stringValue.

```csharp
public static StringValue CreateStringValue(Document3D document, string stringValue, bool isInterface)

```

#### Parameters

`document` Document3D

The document.

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

The string value.

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

The flag of interface.

#### Returns

StringValue

The new string value.

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

Create the stringValue.

```csharp
public static StringValue CreateStringValue(Document3D activeDocument, string stringValue, bool bInterface, string strName)

```

#### Parameters

`activeDocument` Document3D

The active document.

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

The number of array size.

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

The flag of interface.

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

The array name.

#### Returns

StringValue

The new array.

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

Create the user-subroutine.

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

The DLL file name.

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

The function name.

`resultValue` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The number of result value.

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

The expression of user-subroutine.

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

The flag of interface.

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

The user-subroutine name.

#### Returns

UserSubroutine

The new user-subroutine.

### CreateUserSubroutineWithArguments(Document, string, string, int, string, IEnumerable&lt;IArgument&gt;, bool, string, bool)

Create the user-subroutine.

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

The DLL file name.

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

The function name.

`resultValue` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The number of result value.

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

The expression of user-subroutine.

`arguments` [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)&lt;IArgument&gt;

The list of argument.

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

The flag of interface.

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

The user-subroutine name.

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

Flag for add created element to document.

#### Returns

UserSubroutine

The new user-subroutine.

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

Create the variable equation.

```csharp
public static VariableEq CreateVariableEquation(Document3D activeDocument, Function function, double dInitialValue, string strName)

```

#### Parameters

`activeDocument` Document3D

The active document.

`function` Function

The function.

`dInitialValue` [double](https://learn.microsoft.com/dotnet/api/system.double)

The intial value.

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

The variable equation name.

#### Returns

VariableEq

The new variable equation.

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

Create the variable equation.

```csharp
public static VariableEq CreateVariableEquation(Document3D document, UserSubroutine userSubroutine, double initialValue, string name)

```

#### Parameters

`document` Document3D

The active document.

`userSubroutine` UserSubroutine

The UserSubroutine.

`initialValue` [double](https://learn.microsoft.com/dotnet/api/system.double)

The intial value.

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

The variable equation name.

#### Returns

VariableEq

The new variable equation.