Generated DXF file opens in AutoCAD but chrashes BricsCAD

I am working on a DXF (AC1021 version) exporter in Delphi and I ran into some problems. I was looking closely at ezdxf for minimum file structure and I was able to successfully generate it in delphi.

Now the problem I have is that the generated file works OK in AutoCAD but chrashes BricsCAD as soon as I try to click on entity from block.

Below I am sending you my generated file from my google drive. Maybe somebody knows an analyzing tool are maybe has an idea what is wrong with my dxf exporter. Thanks for all the hints!

Comments

  • Try using the _Recover command to open your dxf.

  • How is Recover meant to work ?
    Just for files that crash when trying to open ?

    I have *.baks deactivated.
    I do backups every 8 minutes to a special folder.

    If Bricscad crashes and and I haven't saved for a while,
    I lost some work. The Backup Files is newer.
    So far I search and manually open these and save as to overwrite
    the original file.

    Is there a way that Recover will does this action automatically for
    the working file by caring about the latest backups ?

  • @Michael Mayer:
    The _Recover command is intended for damaged files that can otherwise not be opened, or that when opened lead to crashes. It is not part of some backup system.

  • @Roy Klein Gebbinck said:
    Try using the _Recover command to open your dxf.

    I hoped this would work, but it did not. BricsCAD crashed anyway. Meanwhile I also tried to open the file with AutoCAD (because it works) and saved it as a new file (without changing it). BricsCAD still chrashes!! I don't understand anymore.

    Also one hint: I am using academic BricsCAD Platinum, Version 18.1.08 revision 51397. Luckily I was able to find a friend with an old BricsCAD Pro version 12.2.18 revision 27416. He had absolutely NO trouble opening the file.

    Cheers,
    mitja

  • @mjancic:
    If you use the _Recover command you at least get a list of issues (5 issues each with a short description). The fact that AutoCAD can open the dxf does not make it a valid file. Try using the _Audit command in AutoCAD.

  • Michael Mayer
    edited December 2017

    And maybe start a support request and attach that file.
    Maybe it is just a little bug or an easy solution ?

    Edit
    Ah, I saw the file is already attached :)

  • @Roy Klein Gebbinck said:
    @mjancic:
    If you use the _Recover command you at least get a list of issues (5 issues each with a short description). The fact that AutoCAD can open the dxf does not make it a valid file. Try using the _Audit command in AutoCAD.

    You are absolutely correct. This massively narrows my bug searching area. Thank you.

    According to BricsCAD, the error is
    Name: AcDbLayerTableRecord(22);
    Value: PlotStyleName Id (F);
    Validation: Invalid;
    Replaced by: Set to Null.

    so 390 Hard pointer ID/handle of PlotStyleName object is somehow wrong.

    I'have absolutely no IDEA what the problem is since I don't see any pattern how 390 should be defined.

  • Roy Klein Gebbinck
    edited December 2017

    Officially gc 390 should point to a valid ACDBPLACEHOLDER owned by a ACDBDICTIONARYWDFLT, which in turn is owned by the main DICTIONARY. But doing exactly what BricsCAD does: Set to Null, also seems to be acceptable. So try changing the gc 390 value from 'F' to '0' (zero).

  • This worked!

    Problem solved. THANK YOU!

This discussion has been closed.