This collection provides progressively more advanced Vectorworks Python examples.
These examples are generated using AI analysing internal information.
| Example | Description |
|---|---|
| 01. Draw a Room with Walls | Creates a four-wall rectangular room and applies consistent wall heights. |
| 02. Draw 2D Geometry Primitives | Draws primitive shapes with varied pen and fill attributes. |
| 03. Build a Curved Path with Mixed Vertex Types | Compares straight and rounded polylines built from corner, radius, and arc vertices. |
| 04. Extrude 2D Shapes into 3D Solids | Turns rectangles, ovals, and polygons into positioned 3D extrudes. |
| 05. Turn a Column Profile with Sweep | Sweeps a stepped profile into a column and adds a torus base. |
| 06. Boolean Solids: Drill a Hole Through a Block | Builds an extruded block, subtracts a cylindrical hole, and adds a top box. |
| 07. Set Up Document Structure: Layers and Classes | Creates architectural layers and classes with distinct graphic attributes. |
| 08. Attach and Read Records on Objects | Creates a record, attaches it to sample furniture, and reads the stored fields. |
| 09. Dimensioning and Text Annotation | Produces a measured room drawing with loci, callouts, and linear dimensions. |
| 10. Iterate the Drawing and Report a Summary | Counts active-layer objects and totals bounding-box area using two traversal approaches. |
| Example | Description |
|---|---|
| 11. 2D Vector Math Toolkit | Provides reusable tuple-based 2D vector helpers and visualizes their results. |
| 12. Polygon Area and Centroid (Shoelace Formula) | Calculates signed polygon area, winding direction, and centroid. |
| 13. Point-in-Polygon Test (Ray Casting) | Classifies test points inside an arbitrary polygon with ray casting. |
| 14. Polygon Inward / Outward Offset | Rebuilds a polygon after offsetting each edge by a signed distance. |
| 15. Uniform Arc-Length Resampling of a Polyline | Resamples an open polyline into evenly spaced points along its length. |
| 16. Polyline Simplification (Douglas-Peucker) | Reduces a dense polyline while preserving its overall shape. |
| 17. Convex Hull (Andrew's Monotone Chain) | Finds and draws the counter-clockwise convex hull of a point cloud. |
| 18. Line-Segment Intersection Finder | Finds crossings among line segments and marks their intersection points. |
| 19. Cubic Bezier Sampled to a Polyline | Approximates cubic Bezier curves as Vectorworks polylines. |
| 20. Read a Polyline and Build Walls Along Its Path | Converts a selected or fallback path into auto-mitered, consistently sized walls. |
| Example | Description |
|---|---|
| 21. Hello Worksheet — Create and Populate | Creates, fills, recalculates, and displays a minimal worksheet. |
| 22. Selected Objects → Worksheet Rows | Writes selected objects' properties to individual worksheet rows. |
| 23. Count Objects by Criteria (Formula-Driven) | Builds a live worksheet dashboard using COUNT criteria formulas. |
| 24. Auto-Populating Database Row | Uses a database row and record-field formulas to schedule matching objects automatically. |
| 25. Geometric Property Extraction Table | Reports polygon and polyline geometry in a formatted worksheet. |
26. Sorting and Grouping with SetWSColumnOperators |
Sorts and summarizes a database-row schedule by worksheet columns. |
| 27. Formatted Wall Schedule | Produces a polished wall schedule with geometry, units, and table formatting. |
| 28. Symbol Instance Schedule | Lists symbol definitions with live instance counts and optional cost totals. |
| 29. Cross-Layer Summary | Summarizes object and wall metrics across every design layer. |
| 30. Publish Worksheet Image on a Sheet Layer | Builds a printable sheet-layer worksheet image through an idempotent reporting pipeline. |