    

 ## On this page

  

 

 # Class PythonCodeAPI

 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 PythonCodeAPI

```

#### Inheritance

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

### ImportPythonCode(Document, params string\[\])

Import python code

```csharp
public static Obj[] ImportPythonCode(this Document document, params string[] additionalCodes)

```

#### Parameters

`document` Document

The  to import python code

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

Additional pathes to python codes.

#### Returns

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

Array of the created  entities.

#### Exceptions

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

Raised when document or codes are null or empty.

### ImportPythonCode(Document, IEnumerable&lt;string&gt;)

Import python code

```csharp
public static Obj[] ImportPythonCode(this Document document, IEnumerable<string> codes)

```

#### Parameters

`document` Document

The  to import python code

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

Pathes to python codes.

#### Returns

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

Array of the created  entities.

#### Exceptions

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

Raised when document or codes are null or empty.