How to change entity color devdept.eyeshot.entities entity.

Liwei Jin
Hello, everyone.
Now I am trying to learn eyeshot framework. But I have a struggling.
I am going to change color of selected entity on Design(workspace), I changed a color of entity but it is changed only internally(runtime). I can not see color changed entity, My code is following.
public LGreenState(LDesign d) : base(d)
{
//d.Selection.Color = Color.Green;
foreach(Entity en in d.SelectEntities)
{
en.Color = Color.Green;
d.Entities.Regen();
d.Invalidate();
UpdateAndInvalidate();
}
foreach (Entity en in d.SelectEntities)
{
MessageBox.Show(en.Color.ToString());
}
}
Here LDesign is inherited class from devDept.Eyeshot.DesignBase
Hope to anyone can help me. Thank you in advance.
0
Comments
You need to set the entity coloring method to use the color in the entity itself.
en.ColorMethod = ColorMethod.ByEntity
It works correctly. Thank you, Francis Rouleau.
Please sign in to leave a comment.