Use the Interactive Editor
The Standard Definition dialog box lets you interactively define standards that will then be saved in a .xml file.
Select to access the interactive
standard editor and check that the General category is
selected:

From the File list, select the CATStdLayersAndFilters.xml file.
Click the plus sign next to the CATStdLayersAndFilters
node then repeat this step for each node.
The complete XML tree structure with the values defined by your
administrator is displayed.
As you can see in the picture below, standard
properties have been defined for the following instances:
More precisely, our example shows that the layer
Basic geometry has been assigned number "1" without any comment:

Now let's suppose you want to add a new layer.
Select the Layers List node from the tree structure then click
Add to the right.
This creates a new instance in the tree structure which is named
"NoNameDefined" by default.
Select the created instance, i.e. "Layer2" then
assign a number (the value must be comprised between 0 and 999) to the
layer, a name of your own choosing as well as a comment (if necessary) in
the corresponding boxes as shown below:

To create a new filter, select the Filter List node then
click Add.
Select the created instance ("Filter001" in our example) then enter
the
name of your choice and the layer's visibility status:

Optional: If you are not satisfied with an instance, select the
node under which you want to remove an instance then click Remove.
Optional: In the Layer Remove
dialog box, select the instance to be deleted then click
OK to validate.
The selected instance is removed.
When finished, you can: - Click OK to
save the modifications in the CATStdLayersAndFilters.xml file. A
pop-up message will inform you that the modified standard file
has been saved in the directory specified when setting the CATCollectionStandard variable.
- Click Save As New
to save the modifications in a new .xml file. Clicking this
button opens the Save As dialog box which places you
in the directory you specified when setting the
CATCollectionStandard variable. This new file will
then be accessible from the File list.

Edit the XML File
Standard files are stored in a
format called XML (EXtensible Markup Language) used to exchange data very
easily.
XML files can be customized in a simple way, for instance to add new layers
and filters, provided that you respect some syntax rules.
The CATStdLayersAndFilters.xml is taken as an example but the method is
identical for editing the CATDftStdLayersAndFilters.xml file which is
also available in the General category. Be careful not to edit the
CATStdTypeLayerAndFilter.xml file since it contains the layer and
filter type definition used in the CATStdLayersAndFilters.xml file:

Open the CATStdLayersAndFilters.xml
file in your XML editor.
This file is made up of the following parts:
- XML starting tags indicating the format as well as the name
and type of the file:

- Data related to the "Current" layer and filter, i.e. the
layer to which objects are assigned and the visualization filter
set as current. We recommend that you leave these data unchanged
to avoid any trouble or misunderstanding. In our example, the value "-1" corresponds to the layer "None"
which means that there is no current layer:

- The list of layers declared in this standard file. This list
is surrounded by <std:node name="Layers"> at the
beginning and </std:node> at the end. Two layers have been defined in our example, each layer
definition containing a Number and a Name (a Comment may be added, if necessary):

- The list of layer filters. This list is surrounded by
<std:node name="LayersFilters"> at the beginning and
</std:node> at the end.
Three filters have been defined in our example, each filter
definition containing a Name and a Value:

- The file ends with the tag </std:node>.
To declare a new layer, add a
<std:typeval name="CATLayer"> ... </std:typeval>
sequence to the "Layers" node.
For instance:

Note that the layer number must be comprised
between 0 and 999.
To declare a new filter, add a <std:typeval
name="CATLayersFilter"> ... </std:typeval> sequence
to the "LayersFilters" node. For instance:

As you can see it in the above example, a filter
must be created using a layer number. However, neither filter value
nor filter definition needs the layer to be declared.
For instance, you can enter:

even if "Layer 100" does not exist. You can even use more complex expressions such as "Layer=0
+ (Layer>50 & Layer<100)" but the simpler, the better.
When finished, save the modified .xml file.
The new standards for layers and filters are
applied to any documents you create from now on.
|