Alternative Styles

2282
5
Jump to solution
09-03-2012 02:35 PM
JoanneO_Brien
Occasional Contributor
So I've been playing around with creating alternative styles and I discovered a problem with it. I'm using one major file with multiple start rules that link to many other files created in the facade wizard etc. So when I want to create alternative styles for some of my start rules there seems to be an issue that you can only use the style function at the bottom of the whole rule file (therefore only for the last startrule). I was wondering if there was a function or something you could add below the style function to tell it that the alternative style features have finished and now you're onto a completely new start rule, or is this too much to ask for? Would be really great if this was a capability!

I hope that makes sense anyway!
Tags (2)
1 Solution

Accepted Solutions
MatthiasBuehler1
Frequent Contributor
Hi !


Thanks for the additional inputs.

Yes, styles work only at the bottom of the code, so there's only one 'style section' allowed per rule file. Thus, you'd have to split all your styles among multiple files which you have to import. That's a limitation, but it also keeps the stuff somewhat 'simple'.

A lot of thought went into all this, but of course, it may change again in future. Sadly, not everything is possible ..

View solution in original post

0 Kudos
5 Replies
MatthiasBuehler1
Frequent Contributor
I am not perfectly sure if I understand you correctly.


Are you importing multiple CGA files with Facade Wizard rules, or are you also using the CGA functionality called 'styles'? [I am wondering how you would combine Facade Wizard rules with such styles]

Can you make a little scheme of how things are connected so I can imagine the overall rule structure better ?

Let me know .. 🙂
0 Kudos
JoanneO_Brien
Occasional Contributor
Okay, so originally I had one rule file which I was using to link lots of different facade wizard files to make up my buildings...something like this:
attr height = 10
import building1 : "rules/building1.cga"
@StartRule
Lot-->comp(f){ top : roof | side : facade}
facade-->building1.facade
roof-->etc. 


I would have different startrules for each building and often use multiple facades imported for different sections, but was using the same roof rule etc hence the single rule file.

Now what I was looking to do with the styles function was to modify some of the rules so that it displayed a different facade on some of the walls as an alternative option.

I played around abit and re-wrote the code so that I just have one start rule but a long list of styles for the other buildings (mainly because the first few steps in the rules is always the same) so I guess that's one way around it but it does have the issue of now having quite a few alternative styles for my buildings. I am doing some fairly specific stuff though so it probably isn't something most people need to worry about.
🙂
0 Kudos
MatthiasBuehler1
Frequent Contributor
Hi !


Thanks for the additional inputs.

Yes, styles work only at the bottom of the code, so there's only one 'style section' allowed per rule file. Thus, you'd have to split all your styles among multiple files which you have to import. That's a limitation, but it also keeps the stuff somewhat 'simple'.

A lot of thought went into all this, but of course, it may change again in future. Sadly, not everything is possible ..
0 Kudos
JoanneO_Brien
Occasional Contributor
yes so I'm learning, would love everything to be possible but anyway, its a pretty fantastic program with what it is capable of! 🙂
0 Kudos
MatthiasBuehler1
Frequent Contributor
hey !

thanks for the kind words ! very appreciated !
0 Kudos