Is it possible to colour text? by text I mean "taged" text. Imagine I have a list of cicles colored by a gradient depending on their position, and I want to add text to each circle (Tag3d works fine) but color the text with the same color as the circle....?
Hey David, another question related. Having a list of objects (circles) from rhino, each with different color. How can I get the color of each circle to apply it later to the text .
I have very little scripting skills, and I thought there should be something like .GetColor or .getAttibutes.color.
Pretty tricky to do it right. Object colour can come from multiple sources. Typically objects derive their display colour from the layer they are in. Sometimes they derive the colour from the parent object, and sometimes they override the colour themselves.
You have to dig through the MRhinoObjectAttributes class that comes with every MRhinoObject. Find the ColourSource() property and then extract the appropriate colour.
If you know you'll only deal with objects which have per-object colours, then it becomes somewhat easier:
Dim obj As RMA.Rhino.MRhinoObject =
Dim color As RMA.OpenNURBS.IOnColor = obj.Attributes().m_color
Hi David, many thanks for your time and help. I kind of understand the procedure, but as I said, scripting is not my best quality, and it does not output anything... As input I have a list of cicles created in rhino with 4 different colors. As output I would like to have:
a// 4 lists, each with all the circles with the same color
or
b// a list of the colours of the circles.
Thanks in advance, and waiting to finish my sutides (very soon) to start learning programming more seriuosly :)