Cadwork Api →
While cadwork has native CNC outputs, a specialist manufacturer needed a proprietary format for a Hundegger K2 saw. They built a Python script via the API that traverses all machining operations, sorts them by tool orientation, and writes a custom G-code dialect. This eliminated manual editing of CNC files.
The cadwork API unlocks significant efficiencies for timber construction and prefabrication by bridging design intent with fabrication execution. Successful integrations balance technical translation (geometry and joinery fidelity) with practical concerns (versioning, licensing, and shop verification). Start small, validate thoroughly, and iterate toward fuller automation and BIM interoperability.
If you want, I can: produce a short sample script outline for reading parts via a cadwork SDK (specify target language), draft a data-mapping plan to convert cadwork elements to IFC entities, or sketch a CNC export pipeline. Which would you prefer?
Unlocking Automation in Timber Construction: A Guide to the Cadwork API
In the world of high-end timber engineering and modular construction, cadwork stands as a gold standard for 3D CAD/CAM software. While the core software is powerful, the cadwork API (Application Programming Interface) allows users to transcend out-of-the-box limitations, offering a gateway to fully customized automation, bespoke plugins, and seamless data manipulation.
Whether you are a developer looking to build complex BIM integrations or a cadwork user aiming to automate repetitive tasks, understanding the cadwork API (specifically CwAPI3D) is essential for modernising your workflow. What is the Cadwork API?
The cadwork API provides a programmatic interface that enables external scripts and programs to "talk" to cadwork 3D. It allows you to: News Version 30 - cadwork 3D
Unlocking Automation in Timber Construction: A Guide to the Cadwork API
In the world of timber construction, efficiency isn't just about how fast you can saw; it's about how smart you can model. Since version 27, cadwork has offered a powerful Application Programming Interface (API) that allows users to move beyond standard tools and build custom solutions.
Whether you are looking to automate repetitive tasks, integrate with ERP systems, or create entirely new modeling features, the cadwork API is your gateway to a more streamlined workflow. Why Use the Cadwork API?
The cadwork API (specifically the CwAPI3D) enables the creation of plugins and helper scripts directly within the cadwork 3D environment. This is particularly valuable because:
Custom Automation: You can automate "piece-by-piece" exports or complex shop drawings that typically require manual clicks.
No Core Changes: You can implement customer-specific functions without altering the main cadwork program code.
Ease of Use: While it supports professional-grade development, it is primarily built for Python, a language known for being beginner-friendly yet powerful. Key Technical Features
The API provides a multitude of basic functions for interacting with cadwork 3D elements.
Python Integration: Uses CPython, allowing you to use standard external modules like math, csv, or tkinter alongside the cadwork library.
Controller-Based Architecture: Developers use specific "controllers" to manage different aspects of the model:
Element Controller: For creating and manipulating parts (e.g., creating drillings or vectors).
Utility Controller: For gathering user input via dialogs (e.g., getting a point or a boolean "Yes/No" from the user).
Attribute Controller: For managing and automating metadata (Auto Attributes).
Rapid Prototyping: You don't need to restart cadwork to test changes. Simply save your Python file and rerun the plugin to see updates immediately. Getting Started with Development
To begin building your own tools, follow these standard steps: Cadwork Python Documentation
The "cadwork API" refers to the programming interfaces (Python and C++) used to automate workflows and extend the functionality of cadwork, a leading CAD/CAM software for timber construction. While there is no single "foundational" academic paper for the API itself, its development and use are documented through technical repositories, industry presentations, and recent AI-integration initiatives. Core API Documentation and Resources
Official Python API Repository: The cadwork-api GitHub repository serves as the primary technical reference, containing the source code and documentation for the Python interface.
MCP Server for AI Assistance: As of early 2026, an MCP (Model Context Protocol) server was launched to help developers use AI assistants to generate grounded scripts and explore API modules more effectively.
Technical Implementation: The API allows for the automation of BIM workflows, bridge creation between CAD and other applications, and integration with tools like Rhino.Inside. Relevant Technical "Papers" and Presentations
While not traditional peer-reviewed journals, these documents function as the authoritative "papers" for the software's API evolution:
Rhino User Meeting (2023): A presentation by Michael Brunner titled "APIs in Cadwork: The Bridge Between CAD and Other Applications" details how the Python/C++ APIs optimize timber workflows.
Cadwork Version 30 News: Official documentation (e.g., Version 30 SP2024 PDF) outlines performance optimizations and database compatibility critical for API stability. Key Use Cases
Automation: Generating 3D geometry and shop drawings automatically.
Data Exchange: Linking cadwork models to external databases or structural analysis software.
AI Integration: Using the new MCP server to reduce coding "hallucinations" when scripting complex timber joints or layouts.
The Cadwork API, specifically the Python-based interface introduced in Version 27, represents a paradigm shift for the timber construction industry by bridging the gap between standard CAD/CAM modeling and bespoke architectural automation . The Architecture of Customization
The API operates by exposing the core functionalities of the Cadwork 3D engine to the Python programming language . This allows users to write scripts and plugins that interact directly with the 3D environment without modifying the underlying source code of the software .
Integration: Scripts are integrated through a specific directory structure within the user profile (api.x64 folder) . Once placed, they appear as actionable buttons in the Cadwork plugin bar, enabling a seamless workflow for end-users who may not be programmers themselves . cadwork api
Live Development: A significant advantage for developers is that Cadwork does not require a restart for code changes to take effect; saving the Python file and re-running the plugin immediately reflects the new logic . Core Capabilities and Automation
The API provides a "multitude of basic functions" that allow for complex manipulation of a building model :
Element Manipulation: Developers can create, modify, or delete parts, and perform geometric operations like calculating distances between 3D points or moving elements via vectors .
Process Automation: Repetitive tasks such as generating shop drawings, calculating material lists, and handling exports (IFC, BTL, DXF, etc.) can be entirely automated . For instance, a custom plugin like "Dual Export" can simultaneously export shop drawings for a container and all its individual sub-elements, a task that would otherwise be manually intensive .
Data Exchange: The API facilitates advanced import/export routines, allowing Cadwork to communicate with external data formats or software systems like Revit, Rhino, and Excel . Industry Impact in Timber Construction Cadwork Python Documentation
Introducing the CADwork API: Unlocking the Power of CAD Data
As a developer, have you ever struggled with accessing and manipulating CAD data in your applications? Look no further! The CADwork API is here to revolutionize the way you interact with CAD files and data. In this post, we'll explore the capabilities of the CADwork API and how it can benefit your development projects.
What is CADwork API?
The CADwork API is a programming interface that allows developers to access and manipulate CAD data from within their applications. It provides a set of APIs that enable you to read, write, and modify CAD files, as well as perform various operations on CAD data.
Key Features of CADwork API
Benefits of Using CADwork API
Example Use Cases
Getting Started with CADwork API
To get started with the CADwork API, simply:
Conclusion
The CADwork API is a powerful tool for developers working with CAD data. With its robust features and easy-to-use interface, it can help streamline your development process, improve data accuracy, and increase flexibility. Whether you're building a CAD viewer, a data analysis tool, or an automation script, the CADwork API is the perfect solution. Start exploring the CADwork API today and unlock the full potential of your CAD data!
The cadwork API is primarily accessed via:
Python integration is the most flexible, allowing users to write scripts directly within cadwork’s console or external IDEs.
In the world of timber engineering, steel construction, and industrial prefabrication, cadwork has established itself as a market-leading CAD/CAM solution. For decades, professionals have relied on its powerful 3D modeling environment to design complex structures, from log homes to high-rise mass timber buildings.
However, as projects grow in complexity and the demand for Building Information Modeling (BIM) increases, repetitive manual tasks become a bottleneck. This is where the cadwork API (Application Programming Interface) transforms the game.
The cadwork API is the gateway to automation. It allows developers, power users, and engineering firms to write custom scripts and external applications that interact directly with the cadwork kernel. Whether you want to automate joint detailing, export custom reports, or connect cadwork to your ERP system, the API provides the tools.
This article provides a comprehensive deep dive into the cadwork API: its architecture, supported programming languages, practical use cases, and how it is reshaping digital workflows in the construction industry.
To develop for cadwork, you need:
With the cadwork API, you can:
selected = ec.get_selected_elements()
rafter_ids = [] for id in element_ids: if cadwork.element.get_element_type(id) == 'rafter': rafter_ids.append(id)
The console flickered. Found 312 elements.
Three hundred and twelve beams. Elias did the math. At three minutes per beam manually, that was fifteen hours of work. The script had found them in 0.4 seconds.
Now came the hard part: the geometry. The architect had changed the slope. In Cadwork, everything is defined by vectors—X, Y, Z coordinates defining direction and position. Elias needed to rotate the reference plane.
He closed his eyes, visualizing the trigonometry. "Cosine of two degrees... X-axis pivot..."
He wrote the function, his fingers flying over the mechanical keyboard.
import math
def rotate_vector(vector, angle_deg): angle_rad = math.radians(angle_deg) # Rotation matrix logic here new_x = vector.x * math.cos(angle_rad) new_z = vector.z * math.sin(angle_rad) # ... applying the transformation return new_vector
It was risky. If he got the math wrong, he’d shear the connections, and the beams would be cut into useless, expensive firewood. There was no 'Undo' button for a script that ran on 300 parts at once. While cadwork has native CNC outputs, a specialist
"Measure twice, cut once," Elias muttered. "Or in this case, read the documentation once, deploy once."
He double-checked the API documentation for the set_node function. It required a node index and a point_3d object.
He wrote the loop. This was the "danger zone." The part where the code met the wood.
for id in rafter_ids: # Get the current start and end nodes start_node = cadwork.node.get_point_3d(id, 1) end_node = cadwork.node.get_point_3d(id, 2)# Calculate new position based on the slope change new_end_node = calculate_new_slope(end_node, 2.0) # Apply the change cadwork.node.set_point_3d(id, 2, new_end_node) # Trigger a joinery update cadwork.element.process_joinery(id)
He hovered his finger over the 'Run' button.
If this failed, he’d have to restore a backup, losing the last four hours of minor detailing work. If it succeeded, he’d be done in ten seconds.
"Here goes nothing."
He hit Enter.
The computer hummed. The cooling fans in the tower spun up to a whine. On the screen, the 3D view blurred.
Lines shifted. Points snapped. Polygons twisted.
It looked like a digital tornado was tearing the roof apart. The command prompt spat out lines of text at a blinding speed.
Processing ID 1022... Success.
Processing ID 1023... Success.
Processing ID 1024... Success.
Then, silence. The fans wound down.
Elias held his breath. The model settled. The roof was no longer a flat plane; it had a subtle, elegant curve where the two-degree adjustment had propagated through the trusses.
He zoomed in on a joint—a complex intersection of a diagonal brace and a main rafter. He clicked the 'Check Joinery' button.
Green light.
The birdsmouth cuts were perfect. The bolt holes were aligned. The cut planes matched perfectly.
Elias slumped back in his chair, exhaling a breath he didn't know he was holding.
"
To develop a solid post about the cadwork API, it's important to focus on its role in bridging the gap between CAD modeling and automated timber construction workflows.
Here are a few options for a professional social media or blog post (e.g., for LinkedIn), ranging from high-level benefits to technical implementation.
Option 1: The "Efficiency & Automation" Hook (Best for LinkedIn)
Headline: Stop Clicking, Start Coding: Unlocking the Power of cadwork API 🚀
Are you still performing repetitive manual tasks in your timber engineering workflow? It’s time to talk about the cadwork API.
Whether you are using the Python/C++ API or exploring the integration of Rhino.Inside Cadwork, the API serves as the ultimate bridge between standard CAD and advanced, automated production. Why it matters:
Workflow Optimization: Automate routine modeling tasks, from simple attribute assignments to complex geometric generation.
Seamless Integration: Link your cadwork models directly to external data sources, structural analysis software like Dlubal (e.g., via the LIGNA hall configurator), or ERP systems.
Future-Proofing: Leverage the Python API to stay agile as timber construction moves toward more digital, "Industry 4.0" manufacturing.
The cadwork 3D environment is powerful, but its API is where true scalability lives. How are you using automation to push your timber projects further?
#TimberEngineering #CADWork #Automation #Python #WoodConstruction #DigitalFabrication
Option 2: The Technical "Deep Dive" (For Developers/Power Users)
Headline: The Bridge Between CAD and Code: Exploring the cadwork Python API 🛠️
For those looking to push the boundaries of BIM in timber construction, the cadwork API is a game changer. The ability to manipulate 3D elements programmatically allows for precision and speed that manual drafting simply cannot match. Key Tech Capabilities: Benefits of Using CADwork API
Rhino.Inside Integration: Use Rhino’s geometry kernel to drive complex stand-alone or web applications directly within the cadwork ecosystem.
User Attribute Management: Programmatically manage and structure unlimited user attributes—essential for modern, data-rich BIM models.
Open Development: With libraries available on platforms like GitHub, the community is actively building tools to refactor and optimize cadwork-based workflows.
Automation isn't just about speed; it's about eliminating human error in the transition from design to the production line.
Check out the latest Cadwork News here to see how version 30 and the Hoops Visualize engine are further enhancing these capabilities.
#BIM #SoftwareDevelopment #CadworkAPI #ComputationalDesign #TimberDesign Pro-Tips for Your Post:
Visuals: Use a video of a script running in real-time (e.g., a hall being generated automatically) or a side-by-side of a Rhino/Grasshopper script feeding into cadwork.
Tagging: Mention cadwork or specific integration partners to increase visibility.
Call to Action (CTA): 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
Unlocking Automation: An In-Depth Look at the Cadwork Python API
For timber engineering and wood construction professionals, efficiency isn't just a goal—it’s a requirement.
, a leader in 3D CAD/CAM software for these industries, has significantly leveled up its extensibility by introducing the
—a robust Python-based Application Programming Interface (API).
This transition to Python, starting from version 27, has opened the door for users to move beyond standard software features and build custom tools tailored to their unique workflows. Why Python for Cadwork?
The shift from proprietary macro languages to an open-source standard like Python is a game-changer. Python is widely regarded for its "easy-to-learn, hard-to-master" nature, making it accessible for beginners who need simple scripts while providing the power required by professional developers. Key benefits of the Python API include: Zero Restart Development: One of the most convenient features is that Cadwork 3D does not need to be restarted
for code changes to take effect. Developers can simply save their Python file and rerun the plugin instantly. Direct Integration:
Scripts and plugins can be integrated directly into the Cadwork 3D environment, appearing as custom icons or commands. Customer-Specific Customization:
Companies can implement specialized logic—such as unique list calculations or proprietary export formats—without waiting for core program updates. Core Capabilities of the cwapi3d The API provides deep access to the Cadwork "Element Controller"
, which serves as the brain for manipulating 3D geometry. Through this controller, developers can: Geometric Manipulation:
Create and modify parts like beams, panels, and bolts. This includes complex operations like cutting scarf joints , adding chamfers, or stretching facets. Selection and Filtering:
Programmatically retrieve active or visible elements, filter parts by specific attributes, and check for collisions or contacts between components. Automated Export/Import:
Streamline the output of shop drawings, list calculations, and BIM-compliant data. For example, the Dual Export plugin
allows users to export shop drawings for entire containers and their individual contents simultaneously. BIM and Interoperability:
Enhance BIM workflows by manipulating user attributes and integrating with other tools like Rhino.Inside
, which allows Grasshopper algorithms to automate tasks within Cadwork. Getting Started with Development
The barrier to entry for the Cadwork API is relatively low thanks to comprehensive online documentation
Developing a plugin typically involves creating a folder within the
directory of your user profile. The Python file inside must match the folder name to be recognized as a plugin.
Beginners can start with the basic Python IDLE, while advanced users often use professional IDEs like VS Code or PyCharm by installing the CWAPI3D package on their devices. Community Resources: For those looking to learn by example, the cwapi3d GitHub page
hosts repositories with initial commits and sample code to kickstart projects. The Verdict: A Tool for Scaling Expertise
The Cadwork Python API isn't just about writing code; it’s about capturing a master carpenter's or engineer's expertise and scaling it. By automating repetitive tasks—from simple hole drillings to complex export routines—firms can reduce human error and focus on the art of construction. Whether you are a small shop or a massive timber firm, the Cadwork Python Guide
is the first step toward a more intelligent, automated future in wood construction. specific Python script
example for a task like batch-renaming elements or exporting geometry? Cadwork Python Documentation