VCOM:VectorWorks:Scripting:IPythonWrapper::LoadModule

From Vectorworks Developer
Jump to navigation Jump to search

Description

namespace VectorWorks::Scripting

Member of VCOM:VectorWorks:Scripting:IPythonWrapper

Load a python module in the current run-time.

A file with this name representing the module will be search in the current search path and if found will be loaded.

The other option is to load a moddule from memory buffer. This is the binary format of the .pyo file (compiled automatically by python from .py file)

virtual bool VCOM_CALLTYPE LoadModule(
const char* moduleName) = 0;
virtual bool VCOM_CALLTYPE LoadModule(
const char* moduleName,
void* memory,
int memorySize) = 0;

Parameters

moduleName const char* Module name.
memory void* Memory buffer containing the module.
memorySize int The size of the memory buffer.

Return Value

Uses standard VCOM Error Reporting.

Return value meaning:

kVCOMError_NotInitialized Bad VCOM instance used to call the fuction.
kVCOMError_Failed Routine failed.

Version

Availability: from Vectorworks 2014