We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

Archicad C++ API
About Archicad add-on development using the C++ API.

How I can attach ACCESSORIES object to walls by my own add-on?

Anonymous
Not applicable
The customer requires that the objects were hung on the walls entirely on the whole floor or selectively according to a given condition.
And when moving walls or openings, that objects must correctly rebuilt their contents.
The element based on the ACCESSORY object is best suited for this.
But you can hang it on the wall only through the menu "Wall accessories" and only by clicking the mouse.
How I can you assign an ACCESSORY object to the walls using your own add-on?
5 REPLIES 5
To understand your objective just a little better, what are the given conditions that determine where the objects/elements are to be located on the walls? Some distance from the end, centered between openings...?

ArchiCAD 25 7000 USA - Windows 10 Pro 64x - Dell 7720 64 GB 2400MHz ECC - Xeon E3 1535M v6 4.20GHz - (2) 1TB M.2 PCIe Class 50 SSD's - 17.3" UHD IPS (3840x2160) - Nvidia Quadro P5000 16GB GDDR5 - Maxwell Studio/Render 5.2.1.49- Multilight 2 - Adobe Acrobat Pro - ArchiCAD 6 -25

Karl Ottenstein
Moderator
Steve - This question is in the API developer forum... so I believe the questioner is asking how to create the live associate link in code...
One of the forum moderators
AC 28 USA and earlier   •   macOS Sonoma 14.7.1, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB
Yes. But it could still be important to know what the given conditions are. I assume that the first step in making an Add-on is to model a examples of the intended results. Then sort of reverse engineer the code to generate them.

ArchiCAD 25 7000 USA - Windows 10 Pro 64x - Dell 7720 64 GB 2400MHz ECC - Xeon E3 1535M v6 4.20GHz - (2) 1TB M.2 PCIe Class 50 SSD's - 17.3" UHD IPS (3840x2160) - Nvidia Quadro P5000 16GB GDDR5 - Maxwell Studio/Render 5.2.1.49- Multilight 2 - Adobe Acrobat Pro - ArchiCAD 6 -25

Ralph Wessel
Mentor
They could just use Cadimage Coverings – that's exactly what it does (also to roofs, slabs and columns). Or is there a broader objective?
Ralph Wessel BArch
Software Engineer Speckle Systems
ReignBough
Enthusiast

I was also trying to attach an accessory to a wall. The first thing that I did was set the API_Element::object::owner to the wall guid. But it did not attach to the wall and the API_Element::object::owner becomes APINullGuid after the creation.

 

What info do I need so that the accessory will attach to wall?

 

---------------------------------------------------------------------------

EDIT: Also is there a way to automate adding Wall Accessory? I am thinking of a function that will accept: (a) the guid of the parent wall; (b) the libpart index of the wall accessory; and, (c) the side of the wall (inside/outside) to which the wall accessory will attach to. Simply put, its like (a) selecting the wall; (b) clicking on [Design] > [Design Extras] > [Accessories] > [Wall Accessories...] then selecting the libpart; and finally, selecting side (sideview eye SS.png).

~ReignBough~
ARCHICAD 26 INT (from AC18)
Windows 11 Pro, AMD Ryzen 7, 3.20GHz, 32.0GB RAM, 64-bit OS