Getting the Value of ColorIndex for an Entity

Discuss and ask questions about CAD .NET library.

Moderators: SDS, support, admin

Post Reply
nthangaraj
Posts: 19
Joined: 31 Aug 2017, 09:47

Getting the Value of ColorIndex for an Entity

Post by nthangaraj » 20 Sep 2017, 09:17

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

support
Posts: 3253
Joined: 30 Mar 2005, 11:36
Contact:

Re: Getting the Value of ColorIndex for an Entity

Post by support » 20 Sep 2017, 18:22

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
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

Post Reply