|
Engineering Tools — Randomize Region Colors (00330)
What this tool does
Gives every connection region in the model (or a subset you
pick) its own bright, distinct color, so you can tell regions apart at a glance.
It sets the region’s own color attribute — not the
color of the elements, surfaces or properties inside it. FEMAP stores a color per
region but has no bulk “randomize” command, so on a model with dozens of
regions you would otherwise be editing them one at a time.
When you want it
- Glue / contact set-up review. Lots of regions, often all in the
same color. One run and each region stands out from its neighbours.
- Checking what each region grabbed. A region that picked up the
wrong face or the wrong patch of elements is obvious once every region has its own
color.
- Review slides and reports. A clean picture of the connection
layout without hand-picking colors.
How to use it
- Open Custom Tools > View > Colors > Randomize Region
Colors.
- Leave Prompt for region selection unchecked to recolor
every connection region in the model, or check it to pick regions in the
standard FEMAP selection dialog.
- Click OK. (Help opens this page;
Cancel exits without changing anything.)
- The tool recolors each region, shows progress on the status bar and regenerates
the active view. The message window lists each region (ID, title, new color
number) and finishes with recolored N region(s), M failed.
- Don’t like the draw? Run it again — the palette is reshuffled on
every run.
How the colors are picked
- The pool is 32 bright FEMAP palette colors — reds,
oranges, golds, greens, cyans, blues, violets, magentas and pinks.
- Black, white and the gray ramp are left out so every region
reads clearly against the model background. FEMAP’s default glue color
(sienna) is also left out, so a recolored region never looks untouched.
- The pool is shuffled at the start of each run and handed out in region-ID
order. The first 32 regions all get different colors.
- With more than 32 regions the same shuffled sequence repeats: the 33rd region
gets the same color as the 1st, the 34th the same as the 2nd, and so on.
Notes & limitations
- Only the region color changes. Region contents, connectors and connection
properties are not touched.
- The previous colors are not saved anywhere. If the current color scheme
matters to you, save the model before running.
- Only the active view is regenerated. Other open views pick up
the new colors when you regenerate them.
- If the model has no connection regions (or you select none), the tool reports
No connection regions found and stops.
- A region that fails to load or save is reported in the message window and
skipped; the rest of the run carries on.
- Color numbers in the message window are FEMAP palette indices.
- API note (for script writers): a connection region is an
IContact object from feConnectionRegion —
Get(id), set .color (a palette index),
Put(id). For selection it is entity type 58; FEMAP
defines no named FT_ constant for it.
Related tools
- Regions to Groups — makes one group
per connection region, so you can isolate a region or feed it to group-based
tools.
- Set Layer Colors — the same idea for
layers: a random or fixed color on selected layers.
- Color Elements by Value — when you want the color to mean
something (thickness, area, material, E, CBUSH K or group) rather than just be
different.
- Property Renamer — its connector
pass titles each connector
<master region> - <slave region> -
<property>, which pairs well with colored regions.
|