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

Namespace: [VM.API.Pre](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.API.Pre)\
Assembly: VM.API.Pre.dll

This class implements APIs for [Function](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.DAFUL.Function.md) class.

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

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ←
[FunctionAPI](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.API.Pre.FunctionAPI.md)

#### Extension Methods

[LinkPropertyItemCache.GetLinkProperties(object, LinkPropertyType)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/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-r1/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-r1/lib/VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkedObjects__1_System_Object_VM_Models_Pre_LinkPropertyType_)

## Methods

### CreateFunction(SubSystemDocument, string, IEnumerable\<(string, Obj)>, string, SymmetricType, bool)

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

```csharp theme={null}
[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

The document to create a function.

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

The expression of a function.

`arguments` [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)\<([string](https://learn.microsoft.com/dotnet/api/system.string), [Obj](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.API.Pre.Obj.md))>

The arguments of a function.

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

The name of a function.

`symmetricType` SymmetricType

The symmetric type of the new [Function](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.DAFUL.Function.md)

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

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

#### Returns

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

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

#### Exceptions

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

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

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

Will be thrown if the second element of 'arguments' is not [IArgument](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Models.Pre.IArgument.md).
