VCOM:VectorWorks:Scripting:IPythonWrapper: Difference between revisions
Jump to navigation
Jump to search
m (1 revision) |
No edit summary |
||
Line 7: | Line 7: | ||
namespace <code>VectorWorks::Scripting</code> | namespace <code>VectorWorks::Scripting</code> | ||
.. | This interface is a representation of a python run-time. You can use this interface to create a run-time, set it up, and execute scripts. | ||
Note that executing scripts consecutively in an run-time environment will let all defined variable remain after each script execution. | |||
</desc> | </desc> | ||
Line 22: | Line 24: | ||
<line> | <line> | ||
[[VCOM:VectorWorks:Scripting:IPythonWrapper::AddPath|AddPath]] | [[VCOM:VectorWorks:Scripting:IPythonWrapper::AddPath|AddPath]] | ||
</line> | </line> | ||
Line 38: | Line 36: | ||
<line> | <line> | ||
[[VCOM:VectorWorks:Scripting:IPythonWrapper::RunText|RunText]] | [[VCOM:VectorWorks:Scripting:IPythonWrapper::RunText|RunText]] | ||
</line> | </line> | ||
Line 62: | Line 56: | ||
<code lang="cpp"> | <code lang="cpp"> | ||
typedef VCOMPtr<IPythonWrapper> IPythonWrapperPtr; | typedef VCOMPtr<IPythonWrapper> IPythonWrapperPtr; | ||
</code> | |||
Use the following interface to capture the logging from the script execution: | |||
<code lang="cpp"> | |||
class DYNAMIC_ATTRIBUTE IPythonLogger | |||
{ | |||
public: | |||
virtual ~IPythonLogger() {} | |||
virtual void VCOM_CALLTYPE LogStdOut(const char* msg) = 0; | |||
virtual void VCOM_CALLTYPE LogStdErr(const char* msg) = 0; | |||
}; | |||
</code> | </code> | ||
</remark> | </remark> |
Revision as of 15:46, 19 September 2013
Description
namespace VectorWorks::Scripting
This interface is a representation of a python run-time. You can use this interface to create a run-time, set it up, and execute scripts.
Note that executing scripts consecutively in an run-time environment will let all defined variable remain after each script execution.
Interface
...put the class definition, including the UUID, here...
Members
Remarks
There is predefined type for smart VCOM pointer VCOMPtr to IPythonWrapper interface:
typedef VCOMPtr<IPythonWrapper> IPythonWrapperPtr;
Use the following interface to capture the logging from the script execution:
class DYNAMIC_ATTRIBUTE IPythonLogger { public: virtual ~IPythonLogger() {} virtual void VCOM_CALLTYPE LogStdOut(const char* msg) = 0; virtual void VCOM_CALLTYPE LogStdErr(const char* msg) = 0; };
Version
Available from: Vectorworks 2014
See Also
[[VCOM:VCOMPtr]]