Managing Colors

This task shows you how to set a default color for different types and sub-types of objects using the Define Color command.
This command allows designers who share the same project resource management (PRM) to start out with the same default color for each type of object. This default color will be stored in the color XML file.
Afterwards, the end user will also be able to reset the colors of the objects to the default color in its Version 5 document.
Sample files are provided and it is best to make a copy of them and edit them.

The default location is ...OS_a\startup\XXX\DataDictionary (where XXX corresponds to your application, e.g. EquipmentAnd Systems\StrFunctionalDesign in our scenario) and the files are named clr-DeckPanel.xml and XXXColorSchema.xml (where XXX stands for StrFunctionalDesign in our scenario).

In addition to that, you must change the read/write permission of the file XXXColorSchema.xml as well as the read/write permission of the files with the prefix 'clr-' (please refer to your OS documentation for detailed information on how to do this).

  First, you must setup the default color.
  1. Select Start > Infrastructure > Feature Dictionary Editor then click Open User Dictionary . The Open User Dictionary dialog box opens:

  2. Navigate to the directory where your .CATfct files are stored. In our scenario, we use the CATStrFunctionalDesignSample.CATFct dictionary stored in .. OS_a\resources\graphic.

  3. Click Open.

  4. Double-click a class, e.g. Deck, then click Define Color :

    The name of the class you selected is displayed in the Class name box (where you see "Deck"). This means that the color you are going to choose will be assigned to all objects of this class when placing them in your structure design using the Structure Functional Design workbench.

    The Inherited from box indicates from which parent class the current class (i.e. "Deck") inherits its color. In our example, the class name and the parent class are the same, which means that the "Deck" class does NOT inherit its color from any parent class.

  5. Click the black arrow next to Color then select a color from the list:

  6. To access more colors, or to create your own colors, click More Colors... at the bottom of the list to access the color palette:

    In the Basic Colors area, the first sixteen colors (in the top two rows) are the same as those in the previous list. The remaining four rows contain extra colors.

    The Custom Colors area contains sixteen free boxes in which you can place your custom colors.

  7. Click the Define Custom Colors >> button to display the full color palette and color customization tools then click one of the free boxes in the Custom Colors area:

    The colored area with the cross represents a color spectrum.

    Drag the cross inside the spectrum to instantaneously change the color in the small box below the spectrum.

    The HSL (Hue, Saturation and Luminance) and RGB (Red, Green and Blue) values vary according to where the cross is located. You can also enter HSL and RGB values in the fields provided to suit your exact color specifications.

    Move the arrow up or down to vary the brightness of the custom color.

  8. Once you are happy with the color, click the Add to Custom Colors button to add the custom color:

  9. Click on the custom color, then OK.

    The color is now displayed in the Color box of the Define Color dialog box:
  10. Click OK to save the new color.

    In our scenario, the following two XML files stored in ...OS_a\startup\EquipmentAnd Systems\StrFunctionalDesign\DataDictionary\ have been modified:

    • StrFunctionalDesignColorSchema.xml

    • clr-DeckPanel.xml.

    The RGB values of the new default color are stored in clr-DeckPanel.xml and setting "Dark Green" as the default color has made the file content change from this:

    <?xml version='1.0' ?>

    <!DOCTYPE Doct SYSTEM "schemacolor.dtd">

    <Doct><schema_Color seq_RED = "211" seq_BLUE = "125" seq_GREEN = "178"/></Doct>

    to this:

    <?xml version='1.0' ?>

    <!DOCTYPE Doct SYSTEM "schemacolor.dtd">

    <Doct><schema_Color seq_RED = "0" seq_BLUE = "0" seq_GREEN = "128"/></Doct>

    You are now ready to apply a unique color to all your Structure Functional Design classes.

  11. Close the Feature Dictionary Editor workbench then enter the Structure Functional Design workbench by selecting Start > Equipment & Systems > Structure Functional Design.

  12. Place the object (i.e. "Deck" in our example) in your design. You can see that its color is the one you setup via the Define Color command detailed above:

  13. Now, right-click the Deck object then select Properties to access the graphic properties of the object.

  14. Select another color in the Color list then click OK to validate.

    The object is now displayed in a color other than the default one:

  15. To reset the object to the default color you defined in the steps above, right-click the object then select Reset color.