    

 ## On this page

  

 

 # Class UserSubroutineAPI

 Last update: 16.07.2025 

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

This class implements APIs for  class.

```csharp
public static class UserSubroutineAPI

```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ← [UserSubroutineAPI](VM.API.Pre.UserSubroutineAPI.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

### CreateUserSubroutine(SubSystemDocument, string, string, string, IEnumerable&lt;UserSubroutineResult&gt;, IEnumerable&lt;Obj&gt;, string, bool, SymmetricType, bool)

Create .

```csharp
[NotNull(new string[] { "document" })]
[NotNullOrEmpty(new string[] { "functionName", "dllName" })]
public static Obj CreateUserSubroutine(this SubSystemDocument document, string functionName, string dllName, string parameter = "", IEnumerable<UserSubroutineResult> results = null, IEnumerable<Obj> arguments = null, string name = "", bool isReportOnly = true, SymmetricType symmetricType = SymmetricType.None, bool isInterface = false)

```

#### Parameters

`document` SubSystemDocument

The document to create a user subroutine.

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

The function name of a user subroutine.

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

The dll name of the user subroutine. the input file type is 'dll' or 'so'.

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

The parameter of a user subroutine..

`results` [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)&lt;[UserSubroutineResult](VM.API.Pre.UserSubroutineResult.md)&gt;

The results of a user subroutine.

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

The expressions of a user subroutine..

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

The name of a user subroutine.

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

'true' if it is report Only. Otherwise, 'false'.

`symmetricType` SymmetricType

The symmetric type of the new

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

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

Will be thrown if 'document', 'functionName', 'dllName' argument is null.

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

Will be thrown if the extension of 'dllName' is not 'dll', 'so'.

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

Will be thrown if the type of 'arguement' is not .