By adamwade
#386818
Hey JD,

I've had trouble using the old code you wrote for randomizing Object ID colors. I'm in Rhino 5 (64bit) now and I can't seam to create a button that functions properly. Can you assist please (or anyone else)?

Thanks

Here is the original code you wrote that worked in Rhino 4:

_NoEcho
-_RunScript (
Dim obj, key, r, g, b
key = "MWR_OBJIDCOLOR"
obj = Rhino.FirstObject
While Not IsNull(obj)
r = "255:" & Cstr(Int(Rnd * 256))
g = ":" & Cstr(Int(Rnd * 256))
b = ":" & Cstr(Int(Rnd * 256))
Rhino.SetUserText obj, key, r & g & b
obj = Rhino.NextObject(obj)
Wend
Rhino.Print "Done Randomizing Maxwell Object IDs."
)
Maxwell Rhino 5.2.6.8 plugin with macOS Tahoe 26

Good morning everyone, I’d like to know if t[…]

Sketchup 2026 Released

Sketchup has released 2026 version today. When may[…]

Help with swimming pool water

I've had closer look at the pool image above. I[…]

Hi, Maxwell Render works fine on my Mac M4 with O[…]