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

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

This operation implements the method to import python code into document

```csharp theme={null}
public class ImportPythonCode : OperationBase, IOperation
```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ←
OperationBase ←
[ImportPythonCode](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/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)](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_)

## Constructors

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

Construct [ImportPythonCode](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Operations.Pre.SubEntity.ImportPythonCode.md) operation

```csharp theme={null}
public ImportPythonCode(Document doc, params string[] pathPythonCodes)
```

#### Parameters

`doc` Document

The [Document](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.Document.md) to import python code

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

Additional pathes to python codes

### ImportPythonCode(Document, IEnumerable\<string>)

Construct [ImportPythonCode](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Operations.Pre.SubEntity.ImportPythonCode.md) operation

```csharp theme={null}
public ImportPythonCode(Document doc, IEnumerable<string> pathPythonCodes)
```

#### Parameters

`doc` Document

The [Document](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.Document.md) to import python code

`pathPythonCodes` [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)\<[string](https://learn.microsoft.com/dotnet/api/system.string)>

Pathes to python codes.

### ImportPythonCode(JournalParameter)

Construct [ImportPythonCode](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Operations.Pre.SubEntity.ImportPythonCode.md) operation

```csharp theme={null}
public ImportPythonCode(JournalParameter journalParameter)
```

#### Parameters

`journalParameter` JournalParameter

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

## Properties

### Name

The name of the operation

```csharp theme={null}
public override string Name { get; }
```

#### Property Value

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

### Pathes

Pathes to python codes.

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

#### Property Value

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

### Result

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

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

#### Property Value

PythonCode\[]

## Methods

### Execute()

Execute the operation.

```csharp theme={null}
public override void Execute()
```

### GetInformation(XmlWriter)

Get informations for xml journal file

```csharp theme={null}
public override void GetInformation(XmlWriter writer)
```

#### Parameters

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