Script Author: Ian Rivard

 

Description:

Colors elements based on a chosen scalar value. v1.04 complete rewrite supports element-based coloring by: thickness, area, material, E, EA, Et (E·t), CBUSH K1..K6 stiffness, group membership, or layer membership. Within each metric you can choose a sequential color ramp (low → high) or random / fixed colors per discrete category.

 

Use Instructions:

Run the tool. Pick metric (radio). For sequential metrics, set the low/high color slots. For categorical metrics (group, layer, material), pick random-per-category or fixed-color mode. Pick element selection (default: all). Confirm.

 

 

Requirements:

Open FEMAP model with the relevant property/material/group/layer infrastructure for the chosen metric.

 

Notes:

v1.04 routes random colors through a centralized next_random_color() helper that avoids the bad-color list (0/1 black, 24 yellow, 25/26 dark red/green, 49, 74, 125+). The helper falls back deterministically if the user-chosen color band contains no allowed colors. Replaces direct Rnd()*124 calls that occasionally landed on dark or yellow values that hid edges.

 

Advanced Users:

Pairs with Set Layer Colors (similar mechanism on layers themselves) and Set Colors & Filled Edges View (next_random_color also used there for per-property rerolls).

To our users: We appreciate feedback on our tools and encourage you to modify them to your specific needs. If you make an improvement you feel would be valuable to others, please submit it through our contribution page.