Cadwork — Api
The Cadwork API unlocks a vast spectrum of automation capabilities that can transform a standard drafting department into a highly efficient, data-driven engineering powerhouse. 1. Parametric Modeling and Generative Design
Creating a plugin is straightforward. Follow these steps:
One prefabrication factory connects cadwork to its ERP system via the API. When a model is tagged "Released for Production," the API reads every element's material and length, cross-references stock levels in the ERP, and automatically flags any missing timber lengths. It even generates purchase orders for long-lead items.
For CNC integration, the API can create drillings, mortises, tenons, grooves, and contour cuts. You can define the start point, depth, diameter, and orientation of each machining operation, directly linking design to fabrication. cadwork api
Ask a question like, "What is the one task in cadwork you wish you could automate with a single click?" News Version 30 - cadwork 3D
"
Create a Python file ( .py ) within that folder, using any text editor or IDE. The Cadwork API unlocks a vast spectrum of
Automate routine modeling tasks, from simple attribute assignments to complex geometric generation.
| | Primary Use Case | Key Features | Availability | | :--- | :--- | :--- | :--- | | Python | Writing user plugins for automation. | Easy to learn, rapidly growing popularity, well-documented. | Fully supported. | | C++ API | For performance-critical, low-level access. | Direct interfacing, high performance. | Still available. | | Lua | Previously used for plugins. | Simpler syntax for basic tasks. | End of Life ; version 2026 no longer supports Lua plugins. |
The cadwork API is primarily accessed via: For CNC integration, the API can create drillings,
# Loop through each element and assign it to its own scene for index, element_id in enumerate(element_ids): scene_name = f"Scene_index" if sc.add_scene(scene_name): # Explicitly add only this specific element to the new scene sc.add_elements_to_scene(scene_name, [element_id])
Automating repetitive modeling tasks, exporting custom Excel lists, creating simple UI panels, and data transformation. C++ API (The High-Performance Core)
Leverage the Python API to stay agile as timber construction moves toward more digital, "Industry 4.0" manufacturing.
Don't store critical metadata (e.g., supplier codes) solely in external spreadsheets. Write them as custom attributes to the cadwork elements themselves using the API ( element.set_attribute('Supplier_Code', 'ABC123') ). This makes models self-contained.
He typed a query to find the elements.