Paper_Space block removal

Mar 9, 2015 at 5:39 PM
Hi Daniel,

thanks for your reply about the patch I uploaded for the Paper_Space removal issue,

I understand what you mean and I agree that's the right way ( checking Layout insted of marking Paper_Space as reserved ).

But I would to report you the repro method, so that you could check this too when you will fix this issue :
  • create a really empy document from cad and save to dxf ( without moving to layout, so that the dxf file will not contains that elements and this could happen... it happened to my really_empty.dxf file )
  • open the dxf file with Load method of DxfDocument, then clear Blocks and save
  • open with true view and you will get this error
    "Missing Default entry *Paper_Space in SymbolTable:BLOCK_RECORD
    Invalid or incomplete DXF input -- drawing discarded."
Mar 10, 2015 at 6:25 PM
I am aware of the error you describe. As I explain you earlier its origin begins with the layout creation. A layout and its associated block must be tied together, and to delete one you must delete the other. A block, as any other class that inherits from TableObject, can only be removed if it is not reserved and if it has no references (nobody is using it). Since I did not include the layout as a user of its associated block, the references count its zero and therefore it can be removed. The removal of those blocks should only be possible if the layout is also removed, something that will done automatically.

I already have a working fix that I will include in the next update.