Message 1 of 3
How can I set RenderStyle with color from System.Media.Windows?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm trying to set color of some assembly parts in the assembly components and the colors are from WPF toolkit color picker control , the colors are from System.Media.Windows and I would like to convert this color to Inventor color .
How can I achieve this conversion?
RenderStyles oRenderStyles = AssemblyDoc.RenderStyles;
var color = System.Drawing.Color.FromName("DarkRed");
Color myColor = ThisApplication.TransientObjects.CreateColor(color.R, color.G, color.B) ;
RenderStyle oMyPartStyleSteel = oRenderStyles["DarkRed"]; // throw System.ArgumentException
However , I'm tried using this :
Autodesk.AutoCAD.Colors.Color
But I can't find it in the API of the inventor.