cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
Archicad C++ API
About Archicad add-on development using the C++ API.

Is there an API method to programmatically split Wall or Slab elements?

Tran Thanh Lo
Booster

Hello everyone,

I'm currently developing an Archicad add-on using the C++ API and need to programmatically split Wall and Slab elements along a specified line or plane, similar to the manual Split operation available in the Archicad UI.

After reviewing the API documentation, I haven't found a direct function or method that performs this operation. I'm aware that the API_EditCmdID enumeration includes various edit commands like APIEdit_Drag, APIEdit_Rotate, etc., but none seem to correspond to a split function.

Is there an existing API function or recommended approach to achieve this? If not, what would be the best practice to emulate the split operation programmatically?

Any guidance or examples would be greatly appreciated.

Thank you!

 

TranThanhLo_1-1750046651886.png

 

1 REPLY 1

Hi Lo!

 

I also don't think that there's a split command directly available in the API.
To make a similar command yourself I'd approach it roughly like this:

  1. User Input handling to draw the line
  2. Check for intersections with existing elements (e.g. walls)
  3. Shorten the intersected wall up to the intersection
  4. Create a new wall with the same wall settings and place it on the other side of the intersection

Hope that helps,
Bernd

Automating Archicad with Add-Ons, GDL-Objects & Python Archi-XT.com