Hello All,
I am trying to use a function to create a series of spheres which I have been able to complete. My questions is how do I get the "for loop" to change the Level Name of each sphere, what is the best way to change a objects colour/level etc each time it is created?
Cheers,
Alex
PS, if anyone has a good way to add an "Asset Tag" to a GC custom object I would be really keen to know how.
Hi Alex
For the colour part, see attached. There are 2 methods in here. One with a loop and one using Operation Nodes. I haven't got to the levels, maybe someone will do before me.
For Asset ID, one of the properties of the node will be Catalog Item, you can select one from here or create your own. One of the properties will be ID.
function (CoordinateSystem CS){ for (int i = 0; i < point03.Count; ++i) { Solid so = new Solid(this); so.SphereByCentroidRadius(point03[i], 1.5); so.Color = i; }}
Color by count.dgn
Stuart
Yes, assigning different colors instead of different levels is a better choice. Level input is not replicable, in other words, you can not put two or more level information in the level input. Regarding asset tagging, you may check this out https://www.linkedin.com/posts/anik-mal_solution2020-openbuildings-generativecomponents-activity-6764886298999209984-msmO. I created this during a Hackathon. Feel free to contact me if you have any queries.
Thanks,
Anik
Hey Stuart, sorry for the late reply. I have to fit GC work around other work (sadly). I have been pulled into a few different directions at the moment but hope to jump back into this mid next week. I will let you know how I go. Sadly the Level part was more important than the Colour part for me, but I will still try and adjust the colour as you have suggested above.
Anik,
That looks very similar to what I am trying to achieve in GC. I am in infrastructure so the out of the box options for objects is not what I am after. Out of interest, those ID's that you have in the model, are they placed in GC or have you just used GC to place the objects then go into OBD and edited the data to have the correct ID? I really would like a way to put the asset tag/ID into the model at the GC stage so that no rework is required if the GC needs to be rerun.
If you documented that whole workflow (start to finish) I think it would help a lot of people out.
I always found it frustrating that I have to create a separate node in order to assign a different level to the sub-lists within (I am also in infrastructure). You could always create a custom node to assign different levels like this: