Customizing Standards for Layers and Filters

Standards for layers and filters are provided by default. As an administrator, you can customize the default values specified in these samples to address your needs.

This task shows you how to:


Before you begin:

Two runtime environment variables identify standard files: CATDefaultCollectionStandard and CATCollectionStandard:

  • CATDefaultCollectionStandard indicates the name and path of the subdirectory (or subdirectories) containing the default standards provided by Dassault Systèmes. This variable is defined by default to installation_folder\resources\standard during the installation procedure.
  • CATCollectionStandard indicates the name and path of the subdirectory (or subdirectories) containing the standards customized by the administrator. This means that you must save your customized standards in these subdirectories.

Two XML files are available for layers and layer filters:

  • CATStdLayersAndFilters.xml and CATStdTypeLayerAndFilter.xml for part documents.
  • CATDftStdLayersAndFilters.xml for CATDrawing documents.

Use the Interactive Editor

The Standard Definition dialog box lets you interactively define standards in an .xml file.

  1. Select Me > Preferences > Standards to access the interactive standard editor.
  2. Select the General category.
  3. From the File list, select the CATStdLayersAndFilters.xml file.
  4. Click the plus sign next to the CATStdLayersAndFilters node then repeat this step for each node.
    The complete XML hierarchy with the values defined by your administrator display.

    Standard properties have been defined for the following instances:

    • Current layer and filter.
    • Two layers named General and Basic geometry. See Using Layers for more information.
    • Two filters named All and Current.

    Now let us suppose you want to add a new layer.

  5. From the hierarchy, select the Layers List node, and then click Add to the right.
    This creates a new instance in the hierarchy that is named "NoNameDefined" by default.
  6. Select the created instance, that is, "Layer2" then assign a number to the layer (the value must be comprised between 0 and 999). Then, assign a name of your own, and choose a comment (if required) in the corresponding fields.
  7. To create a new filter, select the Filter List node, and then click Add.
  8. Select the created instance then enter the name of your choice and the layer's visibility status.

    Tip: You can modify any value anytime by selecting the required instance then entering the new value in the corresponding field.

  9. Optional: If you are not satisfied with an instance, select the node under which you want to remove an instance then click Remove.
  10. Optional: In the Layer Remove dialog box, select the instance to delete, and then click OK.
    The selected instance is removed.
  11. When finished, click OK to save the modifications in the CATStdLayersAndFilters.xml file. A pop-up message informs you that the modified standard file is saved in the directory specified by the CATCollectionStandard variable.

    Important: When logged with the appropriate business role, the Save As New command is available to let you save your modifications in a new .xml file.

Edit the XML File

Standard files are in a format called XML (EXtensible Markup Language) used to exchange content. You can customize XML files in a simple way. For example, to add new layers and filters, provided that you respect some syntax rules.

This scenario takes CATStdLayersAndFilters.xml as an example but the method is identical for editing the CATDftStdLayersAndFilters.xml file that is also available in the General category.

Be careful not to edit the CATStdTypeLayerAndFilter.xml file because it contains the layer and filter type definition used in the CATStdLayersAndFilters.xml file.

  1. Open the CATStdLayersAndFilters.xml file in your XML editor.

    This file contains the following parts:

    • XML starting tags indicating the format as well as the name and type of the file.
    • Information related to the "Current" layer and filter that is, the layer containing the objects, and the current visualization filter.
      Recommendation: Leave this information unchanged to avoid any misunderstanding.
    • The list of layers declared in this standard file. The instruction <std:node name="Layers"> is at the beginning and </std:node> at the end. Each layer definition contains a Number and a Name (you can add a Comment, if required).
    • The list of layer filters. The instruction <std:node name="LayersFilters"> is at the beginning and </std:node> at the end. Each filter definition contains a Name and a Value.
    • The file ends with the tag </std:node>.

  2. To declare a new layer, add a <std:typeval name="CATLayer"> ... </std:typeval> sequence to the "Layers" node.

    The layer number must be comprised between 0 and 999.

  3. To declare a new filter, add a <std:typeval name="CATLayersFilter"> ... </std:typeval> sequence to the "LayersFilters" node.

    To create a filter, use a layer number but there is no need to declare a layer for the filter value or the filter definition.

    For example, you can enter Layer=0 + Layer=50 + Layer=100 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.

  4. When finished, save the modified .xml file.

Result: The new standards for layers and filters are applied to any documents you create from now on.

Administrate Standards

You can administrate standards provided that the business role used when logging on allows you to do so.

A role is one of the components of the credentials used to log on. For content security purpose, each user has one or several secured collaborative spaces with a specific role, to manage the different categories of content.

For more information about the business roles, see Collaborative Spaces.

If you logged as Administrator (internal name is VPLMAdmin) or Owner (internal name is VPLMProjectAdministrator), you can administrate the standards. In that case, the Save As New command is available to let you save your modifications in a new .xml file.

Result: The Save As dialog box opens and places you in the directory specified with the CATCollectionStandard variable. You can open this file later on from the File list.

Important: You cannot change the default name of standard files in the General category. For these files, you can only use the Save As New command to generate a new file in another directory but still with the same name.