Parametric design
About Rhino & Grasshopper and PARAM-O.

Favourites and script/python/c# component

alexsks
Newcomer
I'm playing with the connection (I'm a newbie in Rhino/Grasshopper), and I'm a bit confused about what is possible to do programmatically.

So, I read in the connection manual that for most elements, the parameters available are not complete, and if we want completion we should use favourites and connect them to design components directly.

In order to avoid having dozens of favourites with only minor changes between them, is there a way to do this: insert a script/python/c# component (say between a wall favourite and wall design or between wall design and wall parameter) and change for example the thickness or the layer of the wall?

As a test, I try to have a script component with the favourite as input and an unaltered copy as output (either by a = x, or python deepcopy or a copy using classes), and I get "data conversion failed from goo to wall settings". Type hinting is not useful either.

I guess the more general question, for scripting, when the archicad component has an archicad structure/object as an output, are the data in it private and totally inaccessible or there's a way to read/parse/copy/edit them?
10 REPLIES 10
greg_lupo
Booster
As far as I know (and figured out) one can get list of attributes of certain AC_Attribute (called "Inputs" in ARCHICAD GH Addon) but read-only (In python).
Create python component and give it input "zone" and connect "Zone Category" to it, then write in component:

for zone_attr in dir(zone):
    print zone_attr


connect output "out" to panel and one can get list of avaliable attributes like Category number, Color, Name.
Try other AC_attribute components
I asked GS Crew if its possible to create programatically an object of ie AC_ZoneCategory class set its valaues and pass it to Zone Settings component and they responded: "Computer says No"