FS#2594 - Importing indexed DXF colors (ACI) fails
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!)
06.08.2024 12:24
Reason for closing: Fixed
Additional comments about closing:
Workaround added: always use RGB color
if index lookup fails
Loading...
Available keyboard shortcuts
- Alt + ⇧ Shift + l Login Dialog / Logout
- Alt + ⇧ Shift + a Add new task
- Alt + ⇧ Shift + m My searches
- Alt + ⇧ Shift + t focus taskid search
Tasklist
- o open selected task
- j move cursor down
- k move cursor up
Task Details
- n Next task
- p Previous task
- Alt + ⇧ Shift + e ↵ Enter Edit this task
- Alt + ⇧ Shift + w watch task
- Alt + ⇧ Shift + y Close Task
Task Editing
- Alt + ⇧ Shift + s save task
OpenDesign bug or change in OdCmColor::isByACI: returns true for indexed colors
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"?)
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.