VCOM:VectorWorks:Scripting:IPythonScriptEngine::CompileScript: Difference between revisions

From Vectorworks Developer
Jump to navigation Jump to search
No edit summary
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 9: Line 9:
Member of [[VCOM:VectorWorks:Scripting:IPythonScriptEngine]]
Member of [[VCOM:VectorWorks:Scripting:IPythonScriptEngine]]


...put some description here...
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)
</desc>
</desc>


Line 25: Line 25:
script
script
const [[SDK:TXString]]&
const [[SDK:TXString]]&
no info.
The script text.
</line>
</line>
<line>
<line>
inShouldDisplayDialogs
inShouldDisplayDialogs
bool
bool
no info.
Specify TRUE if UI should be used to report errors.
</line>
</line>
<line>
<line>
outWasCompiledSuccessfully
outWasCompiledSuccessfully
bool&
bool&
no info.
Outputs TRUE if the script was compiled ok.
</line>
</line>
<line>
<line>
outLineNumberOfSelectedError
outLineNumberOfSelectedError
Sint32*
Sint32*
no info.
Optional, use NULL if not interested. Report number of errors.
</line>
</line>
<line>
<line>
outErrorText
outErrorText
[[SDK:TXString]]*
[[SDK:TXString]]*
no info.
Optional, use NULL if not interested. Report error text.
</line>
</line>
</lineList>
</lineList>

Latest revision as of 15:42, 19 September 2013

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