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 of the Inspector and choosing.
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.
- Show with user-set attributes
When enabled, user-set attributes are preserved on the shapes, overwriting the default style attributes.
- Display styles as tiles or list
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 selectfrom 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 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.
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, 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, styles can 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-2018 Esri R&D Center Zurich. All rights reserved.