Better: Cadwork Api

Unlocking Automation and Customization: The Ultimate Guide to the cadwork API

8. Where to find the Official Documentation

Since this is niche software:

  1. Open cadwork.
  2. Go to Help > API Documentation (or similar menu item).
  3. Look for the cwAPI.chm file in the installation directory. This is the "Bible" of the API, listing every Class, Method, and Property.
  4. Support: The cadwork support team (support@cadwork.com or your local distributor) is very helpful. They often provide sample C# projects ("Hello World" examples) upon request.

Unlocking Automation: A Deep Dive into the Cadwork API In the world of timber construction, precision and speed aren't just goals—they are survival requirements. As projects grow in complexity, manual modeling often becomes a bottleneck. This is where the Cadwork API

changes the game. By moving beyond standard tools and into the realm of custom scripting, you can automate repetitive tasks, ensure flawless consistency, and push the boundaries of what’s possible in 3D design. What is the Cadwork API?

The Cadwork API (Application Programming Interface) is a bridge that allows external scripts to interact directly with Cadwork 3D. While Cadwork has long supported powerful built-in modules, the API—specifically the Python-based interface

introduced in version 27—empowers users to write their own "helpers" and plugins.

Whether you need to manipulate thousands of parts at once or generate complex list calculations, the API provides the hooks to do it without changing the core program code. Why Python? The Modern Standard

Cadwork chose Python for its API for several strategic reasons: Accessibility

: Python is famously beginner-friendly with a readable syntax, making it accessible to engineers who aren't full-time developers. Vast Ecosystem : Because it uses , you can integrate standard Python modules like directly into your Cadwork workflows. Rapid Development

: Python allows you to write powerful automation in fewer lines of code than older languages, speeding up the transition from "idea" to "working plugin". Transformative Use Cases What can you actually

with it? The possibilities range from "quality-of-life" fixes to total workflow transformations. 1. Part Manipulation and Geometry

The API allows for the programmatic creation and modification of 3D parts. You can: Automate repetitive modeling

: Instantly create plate-and-hole configurations or complex prismatic solids based on input parameters. Geometric analysis

: Calculate distances between 3D points or filter elements based on specific geometric limit values. 2. Attribute Management Data is just as important as geometry in BIM. The API’s Attribute Controller Auto-tagging

: Automatically assign user attributes to elements to structure the design. Mass updates cadwork api

: Change material properties or production types across thousands of elements simultaneously. 3. List and Output Automation

One of the most time-consuming parts of any project is documentation. The API can: Generate custom reports : Run list calculations and outputs directly via script. Batch Exporting

: Use the API to handle various import and export functions, ensuring data consistency across different trades. Getting Started: From IDLE to Advanced Plugins

Starting with the Cadwork API doesn't require a massive infrastructure. Cadwork Documentation

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

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 Open cadwork

: 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

The red light on the server rack blinked—the universal heartbeat of a deadline.

Elias stared at the monitor, his eyes burning. Outside the window of the Zurich office, the Limmat river was dark, reflecting the city lights, but Elias wasn't looking at the view. He was looking at a BIM model (Building Information Modeling) that looked less like a concert hall and more like a digital car crash.

"We have a problem," said Thomas, the senior structural engineer, leaning against the doorframe. He looked fresh; Elias hated him for it. "The steel fabricators need the updated node points for the timber roof trusses by 8:00 AM. The architect changed the slope angle by two degrees."

Elias groaned, rubbing his temples. "Two degrees? That changes every single rafter cut. That’s three hundred beams. I’d have to manually adjust the joinery in Cadwork for every single one."

"And if you don't," Thomas checked his watch, "the fabrication CNC machines sit idle tomorrow. That’s ten thousand francs an hour."

Elias turned back to the screen. The Cadwork interface was open, the 3D model of the glulam beams floating in wireframe limbo. Doing this manually was suicide. He could maybe do fifty beams an hour, and he’d make mistakes. The geometry was too complex, the angles too precise. Unlocking Automation: A Deep Dive into the Cadwork

"I can't do it manually," Elias admitted. "I need an intervention."

He cracked his knuckles and opened his coding editor. It was time to talk to the machine.


Cadwork was a powerhouse of timber engineering, but its true power lay hidden beneath the graphical interface: the API (Application Programming Interface). Most draftsmen clicked buttons. Elias was about to write scripture.

He started typing.

import cadwork

The connection was established. He felt that familiar rush—the feeling of slipping behind the curtain. He wasn't just a user anymore; he was the architect of the process.

He needed a script that would:

  1. Select all roof elements.
  2. Filter for the specific "Rafter" attribute.
  3. Calculate the new vector based on the two-degree slope shift.
  4. Recalculate the end cuts (the "ears" of the wood).
  5. Update the node coordinates.

"Okay," Elias whispered. "Let's get organized."

He typed a query to find the elements.

# Get all elements in the current selection context
element_ids = cadwork.element.get_active_identification()

Use Case 2: Dynamic Camber Calculation

For long-span glulam beams, camber (upward curvature) is mandatory. Using the API, engineers extract the beam's support points and self-weight, calculate the deflection curve (using an external structural library), and write the camber values back into the beam's geometry as a vertical curve—all without leaving cadwork.

Use Case 1: Automated Joint Engineering

A timber frame company used to manually click to assign each mortise and tenon joint. With a 50-line Python script, they automated the logic: "For every beam that touches a column, create a blind tenon of depth = 1/3 of beam height." This reduced engineering time for a roof structure from 8 hours to 15 minutes.

2. Requirements

To develop for cadwork, you need:

  1. cadwork Installed: You must have a valid installation (current versions are usually 64-bit).
  2. Visual Studio: Community or Professional edition.
  3. .NET Framework: Usually .NET Framework 4.8 (for modern versions) or .NET 6/8 (check your specific cadwork version requirements).
  4. API References: The core DLLs located in your cadwork installation folder (e.g., C:\Program Files\cadwork\v3x\).
    • cwAPI.dll (The core logic)
    • cwIFC.dll (For IFC handling)
    • cwVector.dll (For geometry/math)

What is the cadwork API?

The cadwork API (Application Programming Interface) is a set of programming tools that allows users to extend, automate, and customize cadwork’s native functionality. Instead of manually drawing, modifying, or reporting every element, the API enables you to control cadwork through code.

In simple terms: if you can do it manually in cadwork, you can automate it with the API.