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

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

This class represents the service for supporting intellisense of user defined python code

```csharp theme={null}
public static class PythonFunctionIntellisenseService
```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ←
[PythonFunctionIntellisenseService](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Models.Pre.PythonFunctionIntellisenseService.md)

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

## Fields

### OnUpdatePythonModule

Raised when user defined python module is updated

```csharp theme={null}
public static EventHandler OnUpdatePythonModule
```

#### Field Value

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

## Methods

### GetImportStrings(IDocument, bool)

Gets python herder string to import user defined puthon codes.

```csharp theme={null}
public static IEnumerable<string> GetImportStrings(IDocument document, bool includeAddToPathCommand = false)
```

#### Parameters

`document` [IDocument](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Models.Pre.IDocument.md)

The [IDocument](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Models.Pre.IDocument.md) of user defined python modules.

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

if true, include command to add path of module directory.

#### Returns

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

The header strings.

### GetModulePath(IDocument)

Gets the path to the reorganized user defined python module

```csharp theme={null}
public static string GetModulePath(IDocument document)
```

#### Parameters

`document` [IDocument](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Models.Pre.IDocument.md)

The [IDocument](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Models.Pre.IDocument.md) of user defined python modules.

#### Returns

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

The path to the reorganized user defined python module.

### IsRegistered(IDocument)

```csharp theme={null}
public static bool IsRegistered(IDocument document)
```

#### Parameters

`document` [IDocument](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Models.Pre.IDocument.md)

#### Returns

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

### Register(IDocument)

Register the [IDocument](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Models.Pre.IDocument.md).

```csharp theme={null}
public static void Register(IDocument document)
```

#### Parameters

`document` [IDocument](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Models.Pre.IDocument.md)

the [IDocument](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Models.Pre.IDocument.md) to register.

#### Exceptions

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

Raised when document is null.
