vw_exec_python
Execute Python inside Vectorworks with vs in scope to automate drawing edits, return stdout and result values, and surface tracebacks.
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 |