Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Everything E3D

Selecting Graphics Colors Automatically

  • Last UpdatedJan 10, 2024
  • 3 minute read

Keywords:

AUTOCOLOUR

Description:

Lets the user define a set of rules for automating the selection of colors for items added to graphical views. Each rule consists of a set of selection criteria for particular types of element, together with an associated color (which may be an explicit color number or an expression).

When an element is added to the drawlist, the selection rules are scanned in sequence until a rule is found to be true for that element. The element is then added in the color corresponding to that rule. If the color is invalid, the search is continued. If no rule is true for the element, the default color is used. The order in which the rules are set up is significant, since the first rule found to be true determines the color.

Automatic color selection may be switched on or off as required. If it is on, the color specified by the rule is used rather than any other color entered as part of the ADD command. If dynamic autocoloring is specified, the autocolor will be checked every time an attribute is changed and, if necessary, the relevant element will be re-added in the current color.

Each autocolor may be drawn either as a solid color (default) or as a translucent shade. If using translucency, the user can also specify whether or not the edges of an item should be drawn (as in wireline mode) to give a more distinct outline.

Example:

AUTOCOLOUR ALL EQUI COLOUR 4

All Equipment items to be added in color 4.

AUTOCOLOUR ALL EQUI COLOUR 4 TRANSLUCENCY 25 EDGES ON

All Equipment items to be added in color 4 with 25% translucency and edges drawn.

AUTOCOLOUR ALL BRAN WITH (HBORE GT 100) COLOUR 10

All Branches with head bores greater than 100 to be added in color 10.

AUTOCOLOUR ALL SCTN COLOUR (:COLOUR OF SPRE)

All Sections to be added as defined by the UDA :COLOUR derived via their SpecRefs.

AUTOCOLOUR ALL COLOUR (:COLOUR)

Uses the UDA :COLOUR to denote the color for all displayed elements. If the user enters this as the final rule, it will provide a default color if all other rules prove false.

AUTOCOLOUR ON

Colors will be chosen according to autocolor rules. If Off (the default), color specified in the ADD command will be used.

AUTOCOLOUR DYNAMIC ON

Updates autocolor each time an attribute changes. (Use with care!)

AUTOCOLOUR RESET

Clears all current autocolor rules.

AUTOCOLOUR REMOVE 2

Removes the second rule from the current list.

AUTOCOLOUR REORDER 2 TO 4

Moves rule number 2 to position 4 in the list.

Command Syntax:

>- AUTOCOLOUR -+- selection_rule - COLOUR - expression -+->

               |                                        |

               | .-----------------------<--------------'

               | |

               | '- TRANSLucency - expression -+->

               |                               |

               |                               '- EDGES - ON/OFF ->

               |- ON/OFF ->

               |

               |- DYNAMIC - ON/OFF ->

               |

               |- RESET ->

               |

               |- REMOVE - integer ->

               |

               ‘- REORDER - integer1 - TO - integer2 ->

Note:
The expression for Translucency must be in the range 0‑99: the actual translucency will be set to the nearest of 12, 25, 37, 50, 62, 75 or 87

(99 = transparent; 0 = opaque).

AUTOCOLOUR ON must be in force to see the effect of AUTOCOLOUR DYNAMIC ON.

Querying:

Q AUTOCOLOUR NUMber

Gives number of color rules.

Q AUTOCOLOUR MODE

Queries autocolor mode; that means, On or Off.

Q AUTOCOLOUR integer

Gives selection criteria for rule integer.

Q AUTOCOLOUR DYNAMIC

Checks whether dynamic updating is on or off.

Q AUTOCOLOUR FOR id COLOUR

Queries color that would be selected for identified element (this is of most use for batch testing).

Q AUTOCOLOUR FOR id TRANSLUCENCY

Queries translucency setting for identified element.

Q AUTOCOLOUR FOR id EDGES

Queries whether or not edges are to be drawn for identified element (only relevant if translucency is being applied).