We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2023-12-15 11:06 AM
Hi, is it possible to choose an AC Object to place based on a GH script? It seems we can create a new Library Part, but if I set the component to 'Use existing Library Part', is there a way to pass it an object name that it takes from somewhere? Or do we need to 'hard-code' each instance of it?
2023-12-17 06:05 PM - last edited on 2023-12-19 07:07 AM by Laszlo Nagy
Hi,
I don't know if I understand your question the right way. The settings node needs two RMK . First one to choose "Use existing Library Part" and the second one to "Select Archicad Library Part" opens the Dialog to choose the object from the Archicad Libraries. This has to be done one by one.
To have a bunch ob objects available to choose by criteria given from GH script I have this Workaround:
I place all my needed objects in AC and in GH I set an object node for each type. Then "Set multiple objects in Archicad" will bring them in. Afterwards I'm going to set "Internalise Data" and delete my placed objects in AC.
Now you have a "Library Node" named to the types it stores. From this point on you can set your code to manage what and where will be placed (e.g. if Room number is xx then place object yy).
It is not the best of all....but the best I could get from AC/GH.
If you are familiar in Phyton coding than there could be a more smarter solution. But I'm not into it.
2023-12-18 05:11 PM
Thanks, this might have potential. Unfortunately I can't get it to Internalise the data - the option is greyed out on the original Object node. Connecting it to second Object node and internalising that one got me some of the way, but it still failed once I deleted the original reference objects in AC...
2023-12-18 09:03 PM - last edited on 2023-12-19 07:07 AM by Laszlo Nagy
Hi,
Mea Culpa...I opened the GH file again and check the stored object. The problem is that when you delete the objects only the Tag (ifcidentifier) will be kept. And this is a unique number! I've managed to get the names stored but this will be text only without any capability to connect.
Now I'm back to the favorite node and far away from automatism😒. But I will not give up....
2023-12-19 10:20 AM - last edited on 2023-12-21 08:39 PM by Laszlo Nagy
Thanks, glad it's not just me! I wonder if another tactic might be to preset all possible objects used in the script, then pick them using something like Sift Pattern. Only problem is that we might possibly be using any of about 100 objects for this task...
I love the interaction between ArchiCAD and Grasshopper, but I wonder if a few more options might make our life a lot easier! Reading parameters from existing objects and being able to pick object dynamically being just two...