I'm well aware of how to change the material properties of a face to change the color, but this actually modifies the part and the color changes are saved which is unacceptable for our application.
I'm looking for a way to temporarily change the color of a face the same way a selecting a face does - without modifying the part or changing the assigned appearance/material.
I've tried using the selection manager's selection color and assigning a Mark value to each face I want to colorize.
SelectionMgr selMgr = swModel.SelectionManager as SelectionMgr;
SelectData selData = selectionMgr.CreateSelectData();
selData.Mark = 1;
selMgr.SelectionColor[1] = (int)swSystemColorsCurrentColorScheme_e.swSystemColorsCurrentColorSchemeGreenHighlight;
Entity ent;
ent.Select4(true, selData);
Just like the other poor folks that have asked questions about this terribly documented API method, I have had no luck.
They've posted these questions and nobody ever responded:
Is there any better way to do this?
Are there any better resources out there for SolidWorks API developers?
Does anyone from SolidWorks ever read these forums?
Why is this so difficult to do in SolidWorks, but so easy to do in Autodesk Inventor's API? - Assigning different colors to each feature - Manufacturing DevBlog
Thanks,
- Jeremy