Hi! After some testing and trying new features I think I found a way of combining those two wondeful aplications. It’s definetly not perfect, but it’s a good start I guess. Tell me what you think of that way of working.
So, first of all we need to have three of those program installed - newest ArchiCAD, Rhino and Grasshopper. And of course Ladybug Tools. Aaaand actually one more - Rhino 5.0. Why? Because at least for now ArchiCAD has a real big problem with using Live Connection Tool (which is used to connect ArchiCAD and Grasshopper) in Rhino 6. Mainly because previously in Rhino 5, Grasshooper was installed separately and since its already inside Rhinoceros you’ve got to “cheat” a little bit to make it work. The only way that works for now is to install Rhino 5, then install Grasshopper, Rhino 6, then Live Connection Tool and… this should work. Now you are free to uninstall Rhino 5. There’s a big chance that with ArchiCAD 22 this issue will be eliminated.
Ok, so we’ve got our setup working. Now, we need to run all three apps simultanously. Then in ArchiCAD in File> Interoperability we click Grasshopper Connection. We can snap it to out workspace as a tab. Now hit connect. There’s a chance that you’ll see “Grasshopper not working” or something simillar although your Grasshopper is already running. It’s 'cause you have to “show” ArchiCAD that it does, so for example make a component. That should solve the problem.
Now, when you created your drawing in ArchiCAD the only thing that’s important, or the one that is the most important are ZONES. You have to create the sligltly different than usual. They have to fill the entire space now and be “connected”.
Now we’re going to define some values which might be important later. As a little spoiler I can tell you that we can and we will import into Grasshopper some data from the Zones tab in Zones properties under Classification and Properties.
These are things that define our zone inside ArchiCAD. We can manipulate those in any way, as well as removing existing parameters or add ours. To do that you have to click Options > Property Manager. Then you slide down and you’ll see our Zones.
There is a small + sign next to “Zones”. By clicking it you are able to define new parameter.
Now lets move on to Grasshopper. We’re going to use ArchiCAD components which should be already installed on your machine. Now try to find under Parameters component ZONE. Once on a canvas, select it, now click on a your zone in ArchiCAD, then right-click on a ZONE component in Grasshoper and select “Set one Zone in ArchiCAD”. Now your Zone should be visible in Rhino. Now comes the tricky part which is possible since the beggining of current year (so since the last stable update for ArchiCAD 21). From the “Deconstruct” tab select “Deconstruct zone”. Then from “Extract settings” tab pick “Extract zone settings”, then again “Extract settings” and “Extract property settings”. Now if you connect [Panel] to “Properties” you should see all of our Zone Properties from ArchiCAD! It should look like this.
OK! We’re almost there! Now to convert our zone to brep we need a simple definition. Our [Deconstruct Zone] gives us “Curve” output and we’re gonna use that. Just connect it to [Curve] > [Boundary Surface] > [Extrude] and you’ve made yourself one, healthy brep.
Now, let’s say that somewhere in you’re definition you could use some of the data that you’ve imported from ArchiCAD into Grasshopper. It’s never been easier. My friend helped me prepare this code. It’s just a draft, but a working one! Might need some improvement though. Let’s say that you want to extract the number of occupants in a zone:
"""Provides a scripting component. Inputs: x: The x script variable y: The y script variable Output: a: The a output variable""" __author__ = 'Avik' __version__ = '2018.04.21' import rhinoscriptsyntax as rs import os const_string = 'Occupants (Type = Integer) : ' const_unit = '\r\n' # os.linesep string_pos = x.find(const_string) + len(const_string) a = x[string_pos : x.find(const_unit, string_pos)] if a.replace(' ', '').isnumeric(): a = float(a.replace(' ', ''))
Just copy and paste it into Python Component and it should work. If you want to extract some other number just copy what’s in front of it in the panel, for example " Noise Level Requirement (Type = General) : " And paste it after "constr_string = ’ "
Beauty of this lays in its flow. Once you change value in Zone Parameters in ArchiCAD its immediately (or almost immediately) transferred into Grasshopper, where the rest of the magic happens. That’s all, folks. That’s all that I managed to make. I really, really hope that the new version of ArchiCAD - ArchiCAD 22 - will bring new possibilities and will make workflow even more BIM-friendly and easy to use. Tell me what you think about this and have fun!