    

 ## On this page

  

 

 # Class ImportPythonCode

 Last update: 16.07.2025 

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

This operation implements the method to import python code into document

```csharp
public class ImportPythonCode : OperationBase, IOperation

```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ← OperationBase ← [ImportPythonCode](VM.Operations.Pre.SubEntity.ImportPythonCode.md)

#### Implements

IOperation

#### Inherited Members

OperationBase.g\_bRedrawKernel, OperationBase.g\_bVerify, OperationBase.g\_bSkipAddEvent, OperationBase.g\_bDupicateMsg, OperationBase.m\_bIsHistoryMerge, OperationBase.Execute(), OperationBase.PostExecute(), OperationBase.GetInformation(XmlWriter), OperationBase.Create(string, View, object), OperationBase.Create(string, IDocument, object), OperationBase.Create(string, object), OperationBase.Create(string), OperationBase.StartSession(), OperationBase.StartSession(OperationBase, OperationBase.PostOperation), OperationBase.StartSession(OperationBase), OperationBase.StartSessionAndWait(), OperationBase.StartSessionAndWait(OperationBase, OperationBase.PostOperation), OperationBase.StartSessionAndWait(OperationBase), OperationBase.Initialize(OperationBase.ShowVerifyResult), OperationBase.RecordJournal(OperationBase), OperationBase.UseSession(string), OperationBase.raise\_OnOperationStatusChanged(object, OperationStatusEventArgs), OperationBase.raise\_OnEndOperation(object, EventArgs), OperationBase.ClearCurrentMark(string), OperationBase.ClearCurrentMark(IDocument), OperationBase.ClearCurrentMark(), OperationBase.GlobalOverride, OperationBase.IsDoingThread, OperationBase.ExecuteMacro, OperationBase.SimStatus, OperationBase.Status, OperationBase.autoEvents, OperationBase.IsHistoryMerge, OperationBase.SkipClearTemporaryLinkContainer, OperationBase.PostExecuteClearTemporaryLinkContainer, OperationBase.SkipEndOperation, OperationBase.UseMacro, OperationBase.MarkStatus, OperationBase.UseThread, OperationBase.Name, OperationBase.ExecutableOnHold, OperationBase.Override, OperationBase.Parameter, OperationBase.View, OperationBase.Document, OperationBase.OnEndOperation, OperationBase.OnOperationStatusChanged

#### 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_)

## Constructors

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

Construct  operation

```csharp
public ImportPythonCode(Document doc, params string[] pathPythonCodes)

```

#### Parameters

`doc` Document

The  to import python code

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

Additional pathes to python codes

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

Construct  operation

```csharp
public ImportPythonCode(Document doc, IEnumerable<string> pathPythonCodes)

```

#### Parameters

`doc` Document

The  to import python code

`pathPythonCodes` [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.

### ImportPythonCode(JournalParameter)

Construct  operation

```csharp
public ImportPythonCode(JournalParameter journalParameter)

```

#### Parameters

`journalParameter` JournalParameter

The

## Properties

### Name

The name of the operation

```csharp
public override string Name { get; }

```

#### Property Value

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

### Pathes

Pathes to python codes.

```csharp
public string[] Pathes { get; set; }

```

#### Property Value

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

### Result

Constructed  entites

```csharp
public PythonCode[] Result { get; set; }

```

#### Property Value

PythonCode\[\]

## Methods

### Execute()

Execute the operation.

```csharp
public override void Execute()

```

### GetInformation(XmlWriter)

Get informations for xml journal file

```csharp
public override void GetInformation(XmlWriter writer)

```

#### Parameters

`writer` [XmlWriter](https://learn.microsoft.com/dotnet/api/system.xml.xmlwriter)