Command: ColourDHByAttribute
Description:
Colour drillhole or other objects by a user dictionary attribute. Supports numeric, datetime and categorical attributes, produces legends (matplotlib or simple PNG), and can colour geometry using Rhino object color/material. Reads fast from geometry UserDictionary for performance.
Required user inputs:
Select objects to color (reads UserDictionary).
Choose attribute key to color by.
If numeric: choose color ramp and optionally save a legend PNG.
Usage example (one-liner):
Select drillhole objects and run ColourDHByAttribute; choose “Grade” and a colormap to color geometry.
Notes:
Uses RhinoCommon attributes for speed and provides fallback legend rendering if matplotlib is not available.