cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
2024 Technology Preview Program

2024 Technology Preview Program:
Master powerful new features and shape the latest BIM-enabled innovations

Parametric design
About Rhino & Grasshopper and PARAM-O.

Pick existing AC object dynmaically using Grasshopper

derekjackson
Expert

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?

 

derekjackson_0-1702634780548.png

 

4 REPLIES 4
Nurbs
Advocate

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.

Object-lib.png

 

AC16 -> AC aktuell
WIN 10 & Mac Studio Ventura
derekjackson
Expert

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...

Nurbs
Advocate

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....Data_save.png

 

AC16 -> AC aktuell
WIN 10 & Mac Studio Ventura

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...

 

derekjackson_0-1702977640330.png