Aspose CAD not reading proper color ID from DXF

Hello Aspose team,

We have an issue with Aspose.CAD <PackageReference Include="Aspose.CAD" Version="24.12.0" />.

The attached file would not be parsed correctly so proper color information are not given back.
Looking at the file itself i can see that file content 3 diff colors, however the entity would always return

Mapping color for Entity: ColorValue=0, ColorId=256, ColorHandle=empty LayerColor=7

Which make it impossible for us to solve our customer problem and to any how distinguish between colors.
ENGRAVE WBW TROLASE.zip (299.7 KB)

|Layer / Context|ACI Color|
|β€”|β€”|β€”|
|0|1| Red|
|0|5| Blue/Magenta|
|0|7|White/Black (depends on background)|

@VartanSaakian

It appears you are encountering issues with Aspose.CAD not accurately reading color information from a DXF file. The color values returned (ColorValue=0, ColorId=256, etc.) indicate that the entities may not be parsed correctly.

Here are several steps you can take to troubleshoot and potentially resolve the issue:

  1. Check DXF Version: Confirm that the DXF file is in a version supported by Aspose.CAD. Certain DXF versions may have limitations or compatibility issues.

  2. Update Aspose.CAD: If you are using an older version (e.g., 24.12.0), consider updating to the latest version of Aspose.CAD. Newer releases often include important bug fixes and enhancements.

  3. Inspect Layer Properties: Review the layer properties in the DXF file. It’s possible that color settings are overridden or not properly defined within the layer settings.

  4. Use Color Mapping: If the DXF file employs color mapping, ensure that the mapping is correctly defined. You may need to manually map the colors according to the ACI color table.

  5. Debugging: Implement logging to track the parsing process and identify where the color information may be lost.

If these steps do not resolve the issue, consider reaching out to the Aspose support forum with specific details about the DXF file and the context of the problem for further assistance.

Feel free to ask if you have any additional questions!

@VartanSaakian,
Hello,
we have created ticket CADNET-10286 to investigate and fix this issue.