    

 ## On this page

  

 

 # Class FunctionAPI

 Last update: 09.03.2026 

<a id="VM_API_Pre_FunctionAPI"></a>

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

This class implements APIs for  class.

```csharp
public static class FunctionAPI

```

#### Inheritance

object ← [FunctionAPI](VM.API.Pre.FunctionAPI.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_FunctionAPI_CreateFunction_VM_Managed_DAFUL_SubSystemDocument_System_String_System_Collections_Generic_IEnumerable_System_ValueTuple_System_String_VM_API_Pre_Obj___System_String_VM_Managed_SymmetricType_System_Boolean_"></a> CreateFunction(SubSystemDocument, string, IEnumerable&lt;(string, Obj)&gt;, string, SymmetricType, bool)

Create .

```csharp
[NotNull(new string[] { "document" })]
[NotNullOrEmpty(new string[] { "expression" })]
public static Obj CreateFunction(this SubSystemDocument document, string expression, IEnumerable<(string, Obj)> arguments = null, string name = "", SymmetricType symmetricType = SymmetricType.None, bool isInterface = false)

```

#### Parameters

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

The document to create a function.

`expression` string

The expression of a function.

`arguments` IEnumerable&lt;(string, [Obj](VM.API.Pre.Obj.md))&gt;

The arguments of a function.

`name` string

The name of a function.

`symmetricType` SymmetricType

The symmetric type of the new

`isInterface` bool

'true' if it is interface body. Otherwise, 'false'.

#### Returns

[Obj](VM.API.Pre.Obj.md)

The new  object that is created by this API.

#### Exceptions

ArgumentNullException

Will be thrown if 'document', 'expression' argument is null.

ArgumentException

Will be thrown if the second element of 'arguments' is not .