Page 1 of 1
Getting the Value of ColorIndex for an Entity
Posted: 20 Sep 2017, 09:17
by nthangaraj
Please let me know how to get the color index (AutoCAD ColorIndex # (ACI)) for any Entity?
I can able to get RGB and not ColorIndex.
Thanks
Thangaraj N
Re: Getting the Value of ColorIndex for an Entity
Posted: 20 Sep 2017, 18:22
by support
Hello,
It is possible to convert an RGB color to AutoCAD color using a static method
ColorToDXF, so when you get the RGB color value for some entity, you can easily retrieve an AutoCAD Color Index number for this color:
Code: Select all
int acIndex = CADImport.Export.SimpleCADtoDXF.DXFExport.ColorToDXF(cadEntity.Color);
Mikhail