I'm currently working on a way to create a CGA rule file which can generate many different buildings within a short period of time. The goal is to create a rulefile which lets the designer investigate multiple designs without having to redraw his/her project every time. I'm working with the assumption that a design of a building plan consists of three parts, the distributions of the building footprints (bldgFootprints), the envelope (bldgEnvelope) and a facade (bldgFacade).
The goal is to have a main cga rule file, which link to a rule file that draws the bldgFootprints. This file then link to a file which draw the bldgEnvelope, and finally, the bldgEnvelope links to a cga file which draw the bldgFacade.
To avoid having to write all of the different "types" of building footprints in one rule file, I would like the bldgFootprint to link to other rule files, and by using a drop-down menu choose between them. Se diagram below.
By using this structure, it would be possible to write a new CGA file for a specific building footprint, and then add that to the overall structure simply by naming the instances within sub-rule file the right names. It would also eliminate the need for writing one very long cga file which can generate all possible building footprints. By using this structure it would be possible to make the "Database" bigger and bigger over time by adding more and more bldgFootprints0X to the project. So the first question, does this seems as a relevant way to do it, it will end up with a very very big amount of rule files and some of them will maybe have the ability to do the exact same thing but on the other hand it allows the designer to create an individual script and add it to the overall structure.
The next question is, I simply can't get it to work, I have managed to link the main file with the bldgFootprint, link that to bldgFootprint0X, link those to bldgEnvelope, but the attributes which is located in bldgEnvelope is not visible in the inspector.
It looks like it is only possibly to have three layers of linked files visible in the inspector, so my "main" can link to "bldgFootprint" which can link to "bldgFootprint0X" and all the attributes show up, but when the "bldgFootprint0X" links to "bldgEnvelope" the attributes for envelope does not show up..
I'm looking for all the help and thoughts I can get on the subject, does any of you have relevant experiences with this type of project, can you see a more simple path through. Am I on the right track or is it just stupid? If anybody has an interest in the project and which to follow it more, you are welcome to send a message to me.
I tried to recreate your structure with Subdivide.cga, master_structure.cga, and master_texture.cga. I have a shape that has the Subdivide.cga rule applied to it. Then, I tried to modify master_texture.cga, (for example by changing the value of an attr in the cga file or adding a rotation to the rule), and it works for me (the model is correctly regenerated with the changes).
We are aware that there are cgb refresh problems (and I've noted your issue), but without an exact repro, it will be hard to fix. If you are willing to share more insights, we'd be grateful, and you could write to me privately instead if you'd be willing to privately share some code.