Cadwork is a suite of CAD/CAM/BIM tools popular in timber construction, carpentry, and building projects where precise joinery and fabrication data matter. The cadwork API (application programming interface) lets developers and advanced users extend, integrate, and automate cadwork workflows by exposing programmatic access to model data, geometry, and project metadata. Below is a concise, practical exploration of what the cadwork API enables, common use cases, integration patterns, and practical tips for getting started.
cwexe) via defined Interfaces.MyCadworkPlugin).Since this is niche software:
support@cadwork.com or your local distributor) is very helpful. They often provide sample C# projects ("Hello World" examples) upon request.graphical programming module for handling individual elements within assemblies or containers. Cadwork Documentation 1. API Functionality cadwork Python API
provides specific methods for managing piece-by-piece data, often used in export routines for shop drawings or manufacturing lists. Cadwork Documentation Export Control : Methods like get_piece_by_piece_export_with_dimensions set_piece_by_piece_export_with_dimensions
allow scripts to toggle whether an assembly is exported as a single unit or as its individual "deep" components. Container Interaction
: The API can iterate through selected containers to retrieve "piece-by-piece" content for specialized exports, such as individual shop drawings for every element within a large modular unit. Cadwork Documentation 2. DeepNode Integration
is cadwork's node-based graphical programming interface that simplifies API calls without requiring manual coding. cadwork 3D Node Library
: It contains pre-built nodes for "element creation" and "part modification" that effectively perform the "deep" logic of the standard API. Custom Nodes
: Users can group basic nodes to create custom functions that operate on deep element structures across different scripts. cadwork 3D 3. Practical Application
Common use cases for "deep piece" logic in the cadwork API include: Dual Export
: Simultaneously exporting a container's overall shop drawing and the individual drawings for every piece inside it. Automated List Calculations
: Evaluating the properties of every individual part within a complex construction to generate production lists. Nesting and CNC
: Preparing individual elements for external nesting managers or CNC export solids by drilling down into container hierarchies. Cadwork Documentation specific Python code snippet
to handle piece-by-piece exports, or are you trying to build a node in Cadwork Python Documentation cadwork api
Title: Beyond the Click: Unlocking the True Power of cadwork with its Native API
Introduction: The Repetition Trap
If you have been using cadwork for any length of time, you know the drill. You spend hours adjusting connection plates, renaming 200 beams one by one, or exporting data to Excel only to reformat it manually. You know the software is powerful—especially for timber engineering—but sometimes it feels like you are fighting against the clock rather than designing.
What if you could press a single button and let the computer do the boring stuff?
Enter the cadwork API. It is not just for programmers. It is the secret weapon that turns cadwork from a drafting tool into an automated engineering assistant.
What is the cadwork API?
API stands for Application Programming Interface. In plain English, it is a bridge that allows external scripts to talk directly to your 3D model.
Instead of clicking "Wall Tool," drawing a rectangle, and extruding it, you write a line of code that says: "Create a wall, 3 meters high, starting at coordinates (0,0), with a layer named 'CLT_240'."
cadwork has evolved its API significantly over recent versions. Currently, the most robust way to interact is via Python (through the cwapi34.pyd module) or C++. Python is the clear winner for most engineers because it is free, easy to learn, and incredibly versatile.
Why should you care? 3 Real-World Use Cases
Let’s leave the theory behind. Here is how the API changes your daily workflow.
1. Automated Timber Framing (The "Holy Grail") You have a raw architectural model (an IFC file) with generic walls. Manually converting each wall into a timber frame stud layout takes days.
2. Smart Naming & IFC Export BIM requires data. If your element names are "Beam-1," "Beam-2," your IFC export is useless for the structural engineer. Cadwork API: an enlightening overview Cadwork is a
Glulam_200x400_Level_2. Export it with custom property sets (PSets) that your structural analysis software actually recognizes.3. Connection Logic (Hilti, Simpson, Rothoblaas) This is where cadwork shines. Instead of manually placing 200 screws, you write a script that identifies where two beams intersect. The script checks the angle, calculates the shear force (if you have the load module), and places the correct Simpson strong-tie bracket automatically.
Getting Started: The 60-Minute Challenge
You do not need a computer science degree. Here is your roadmap for week one.
Step 1: Enable the Developer Tab
In cadwork, go to Settings > Preferences > Developer. Make sure the API interface is active. You will find the "Script Editor" or "Python Console."
Step 2: Your First "Hello World" Open the Python console and type this:
import cwapi34 as cadwork
point = cadwork.point_3d(0, 0, 0)
my_beam = cadwork.create_beam(point, cadwork.vector_3d(5, 0, 0))
cadwork.set_name(my_beam, "My First API Beam")
Hit run. You just created a 5-meter beam without touching a single toolbar.
Step 3: Record a Macro Don’t know the syntax for a specific tool? Turn on the "Macro Recorder" in cadwork. Do the action manually (e.g., create a mortise and tenon joint). Stop the recorder. cadwork will show you the exact API code it just used. Copy, paste, tweak.
The "Don't Do This" Warning
The API is powerful, but it is a scalpel, not a hammer.
The Future: BIM and Scripting
As we move toward fully automated timber construction, the gap between CAD and CAM is shrinking. Your CNC machine (Hundegger, Weinmann, etc.) wants G-code. Your cadwork model has the geometry.
With the API, you can write custom post-processors. You can tell the machine exactly how to orient the log to minimize waste, based on your parametric model. The days of exporting DXF and redrawing it for the robot are ending.
Conclusion: Don't Click. Compute.
You invested in cadwork because it is the best in class for heavy timber and engineering. But you are only using 60% of its value if you aren't scripting.
Start small. Automate the naming convention this week. Automate the purlin layout next week. Within a month, you will have a library of scripts that turn your 3-hour tasks into 3-second pauses.
The machine is waiting for your commands. Why type them out every single time?
Ready to write your first line?
Open your cadwork model, hit F12 (or find the Python console), and type import cwapi34 as cw. Your journey to automation starts now.
Do you have a specific cadwork automation problem? A joint that takes too long to place? A report that is a nightmare to compile? Drop your use case in the comments below, and we might write the script for you.
In the world of heavy timber construction, Cadwork is the silent heavyweight. For decades, it has been the digital chisel for log homes, bridges, and soaring glulam arches. But for most users, Cadwork feels like a vast, ancient library: infinitely knowledgeable, but rigid. You can pull any book (or beam) off the shelf, but you must walk the aisles yourself, manually.
Then came the Cadwork API (Application Programming Interface). And suddenly, the library developed a ghost.
The API is not a feature you click. It is a backdoor into the soul of the software—a text-based interface that lets you speak to the 3D model in a language of logic, loops, and variables. To the uninitiated, it looks like a messy script of Python or C++. But to the initiated, it is a lever that moves mountains.
The cadwork API is not just a feature—it is a strategic asset. Whether you are a solo engineer tired of clicking "Add Tenon" for the thousandth time, or a factory manager seeking zero-defect data transfer, the API delivers.
By investing time in learning Python and the cadwork control library, you unlock a new level of precision, speed, and customization. Start small: automate a single repetitive task. Then expand. Within weeks, you will wonder how you ever modeled without code.
Next Steps:
cadwork package.The future of timber construction is automated. The cadwork API is your tool to build that future.
Need professional cadwork API development for your firm? Contact a certified cadwork solution partner, or post your requirements in the official cadwork API community. Language: C# (primarily) or any
Here is informative content developed for cadwork API, tailored for professionals in timber construction, civil engineering, and structural design.