    

 ## On this page

  

 

 # Class PythonCodeAPI

 Last update: 09.03.2026 

<a id="VM_API_Pre_PythonCodeAPI"></a>

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 ← [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

### <a id="VM_API_Pre_PythonCodeAPI_ImportPythonCode_VM_Managed_Document_System_String___"></a> 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\[\]

Additional pathes to python codes.

#### Returns

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

Array of the created  entities.

#### Exceptions

ArgumentNullException

Raised when document or codes are null or empty.

### <a id="VM_API_Pre_PythonCodeAPI_ImportPythonCode_VM_Managed_Document_System_Collections_Generic_IEnumerable_System_String__"></a> 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&lt;string&gt;

Pathes to python codes.

#### Returns

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

Array of the created  entities.

#### Exceptions

ArgumentNullException

Raised when document or codes are null or empty.