CGA styles are a comfortable way to store and reuse sets of rule parameters.
Select a shape with a rule file assigned, and open the Style Manager by pressing the Style Button in the Rule Tab in the Inspector.The Style Manager displays all available styles in its rule set. A rule file that has no styles defined shows only one style (the default style).
To assign a style to the selected shapes, select the desried style and hit ok (or doubleclick the style).
Delete a style by pressing the red cross in the top right corner of a style.
- Display styles as tiles or list
- Frame views
- Choose camera
- Viewport settings
Creating a new Style
Creating a new style stores the current parameter set to a style. To create a new style, select your desired shape or model, and press the button next to the style button.
|Style name||Use a unique name for your style. An existing style with the same name will be overwritten|
|Based on||The reference style which the new style is based on. This can either be the Default Style or the current style (if one is applied)|
|Description||An optional description for the style|
When the new style is created by pressing :
- All all user-set attributes are converted to Default (Rule) values for the new style (all user-set attributes "baked" into the new style). Mapped attributes (mapped to Object Attributes or Map Layer) will keep their connections.
- The new created style is applied to the selected shapes
- The new style is now available in the Style Manager as well
Style Context Menu
Operations on styles are available as well from a context menu. Right-click in the attribute area of a rule file to bring up the context menu:
|Select Style||Selecting one of the available styles from a list|
|Create new style ...||Create a new style, bring up the create style dialog|
|Delect current||Delete current style|
|Reset user attributes of rule file||Reset all user-set attributes of this rule file to its default (Rule) values|
|Reset all attributes of rule file||Reset all user-set and mapped attributes of this rule file to its default (Rule) values|
Styles in CGA rule file
When a new style is created using the create style wizard, the active CGA rule file is modified, a new style section is created at the bottom of the rule file.
Depending on the creation options, a different set of attributes are added to the new style.
Note in particular that in case a new style is created based on an existing style, with the option set to Create style with user attributes only, the new style extends the parent.
- A new style is created based on the default style:
All user-set attributes are added as attributes to the new style, with their user value set as initial value (Default Rule value)
- A new style is created based on its current style:
The new style extends the previous one. Only attributes that are different from the base style are added as attributes to the new style, attributes from the base style are inherited.
attr mColor = "#ff0000" attr height = 1 Lot --> color(mColor) extrude(height) style Design1 attr mColor = "#006600" attr height = 2 style Design1_2 extends Design1 attr mColor = "#99ff99"
Of course can just as well be added and modified in the CGA text editor instead of using the style wizard. Please see styles in the CGA reference for more information.
Copyright ©2008-2016 Esri R&D Center Zurich. All rights reserved.