vw_exec_python
Run arbitrary Python code inside Vectorworks with vs in scope and get stdout, the last expression or result, plus tracebacks. Use it to automate or inspect drawing tasks.
Instructions
Run arbitrary Python inside Vectorworks with vs in scope.
Returns stdout, the value of the last expression (or of a variable named
result), and the traceback if it raised. Vectorworks embeds Python 3.9.
Handles are only valid during the call; return UUIDs
(vs.GetObjectUuid) to refer to objects later. A wrong vs.* signature can
pop a modal "Script Errors" dialog in Vectorworks instead of raising;
check with vw_vs_lookup first. Set modifies_document=False for read-only
code; otherwise vw_revert_last can't step past this call.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| modifies_document | No |