VCOM:VectorWorks:Scripting:IPythonScriptEngine::CompileScript

From Vectorworks Developer
Jump to navigation Jump to search

Description

namespace VectorWorks::Scripting

Member of VCOM:VectorWorks:Scripting:IPythonScriptEngine

Compile script to report syntax errors. Note that Python is run-time language and most of the errors are reported during execution. This function will report only syntax errors for the language constructions only (will not report undefined variable names for example)

virtual VCOMErrorVCOM_CALLTYPE CompileScript(
const TXString& script,
bool inShouldDisplayDialogs,
bool& outWasCompiledSuccessfully,
Sint32* outLineNumberOfSelectedError,
TXString* outErrorText) = 0;

Parameters

script const SDK:TXString& The script text.
inShouldDisplayDialogs bool Specify TRUE if UI should be used to report errors.
outWasCompiledSuccessfully bool& Outputs TRUE if the script was compiled ok.
outLineNumberOfSelectedError Sint32* Optional, use NULL if not interested. Report number of errors.
outErrorText SDK:TXString* Optional, use NULL if not interested. Report error text.

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