← All bug reports

FS#2594Importing indexed DXF colors (ACI) fails

Type
Bug
Status
Closed
Resolution
Fixed
Category
QCAD (main)
Severity
Low
Priority
Low
Reported version
3.30.1
Operating system
All
Reported
2024-08-06 by Anda
Closed
2024-08-06 by andrew
Votes
1

After upgrading from 3.27 to 3.30.1, I'm observing what appears to be a regression regarding the colors. When opening DWGs from external sources, some layers now end up with an undefined(?) color, the color in the layer list is shown as a rainbow, when editing the layer attributes, it's shown as black, and the actual entities in model space are white. And worse, if I save the drawing in that state (not changing anything before), color information for these layers is lost, if I open them again (using any version), the layer list is now showing black as well.

Opening the same original DWG with 3.27 works as expected, the layers have their normal (non-custom) colors. If I save it using 3.27 as either DWG or DXF, I can open it in 3.30 without problems.

Testing further, it seems, that this not only affects layer colors, but also those of some entities, I found an example DWG, that shows it: https://download.autodesk.com/us/samplefiles/acad/colorwh.dwg

I did also test a Windows Trial version in a VM with the same result, so it does not seem OS specific.

(OT: I have bought a license, but I can't download any older versions. It would be good, if one could at least download the last "stable" version as well. Thanks!)

Comments (3)

andrew 2024-08-06

OpenDesign bug or change in OdCmColor::isByACI: returns true for indexed colors

Anda 2024-08-07

Thanks for checking this quickly. Regarding "always use RGB color if index lookup fails", that sounds like the indexed color is replaced? Maybe I'm not understanding that correctly, but if the index is not preserved, that would still be a data loss, and potentially even worse if harder to detect?

(Probably doesn't really matter, but regarding the "Severity", besides being a regression this seems to be a data loss, but still just "Low"?)

andrew 2024-08-08

QCAD never stores colors as indices, always as RGB. The same color (e.g. red) can be stored either way without changing the color.

Any file that is imported into QCAD from another source might contain features, entities or other data that are not supported by QCAD which can result in data loss. The same is true the other way around. External files opened in QCAD should always be considered a best effort import.

Closure comment

Workaround added: always use RGB color if index lookup fails