Purging un-pergable layers

 I have a number of layers that I cannot purge.  There is no block associated with the layer that I can find. I tested for this by changing to the layer in question  and then turning off all layers, but that one. Finally, I zoom out and draw a selection window to grab anything that might be there.  This is to make sure I grab even a tiny object.

Years ago, I recall that if a layer was frozen in a viewport, that layer could not be purged.  Is that the likely cause here?  I also recall at the time that there was a "Super Purge" command that allowed you to purge those layers.  Is that command available to BricsCAD by some alternative name?

-Joe

Comments

  • I get that too, hadn't looked for the viewport issue being the cause.

    Once satisfied a layer is not used I think it can be Deleted (or merged), but it's hard to be sure when it won't purge. 

    I sometimes want to delete some layers used in blocks, for a while I lost the ability but now seem able to again.

  • Joe,
    did you make sure that there are no unreferenced blocks in your drawing that carry a reference to these layers?
  •  In regards to block, I know a block can have an element that is on my problem layer. So, that is why I turned off all layers, but the problem one, and tried to select anything left on screen. 

    But, there is also an alternative possibility that I don't know how to test.  Suppose I have a block, with all the objects on layer Q.  But, I insert the block itself on layer T.  If I turn off layer Q, the block will not be visible, or selectable.  This is unlikely to be the issue, since I normally use layer 0 for blocks.  But, there doesn't seem to be any way to solve it.

    I have tried the "Merge To" option in the Drawing Explorer/Layers, but it does not open the merge window.  There is no error message either.

    -Joe
  •  I just did a test of the merge layers function on a new test drawing.  The merge layers dialog box did open for me this time, and I was able to use the feature to change objects on that layer to a different layer.  Though, in the drawing where I have the problem, that dialog box will not open.

    On my test drawing I also verified that if a layer is frozen in a viewport, that layer cannot be purged.

    On my problem drawing, I actually did try using vplayer to thaw that problem layer on all viewports, but even then I cannot purge or merge that layer to another.

    On the same drawing, I add a new layer, and put an object on that layer. The merge command did work properly. 

    I also tested to see if you can merge objects that are inside blocks. So I created an object on that layer I would later purge, and put that object in a block I created on layer 0.  I was also successful at merging that test layer to layer 0

    -Joe
  • Joe, are you sure that you have removed all VP overrides? It is important to realise that layouts can also have VP overrides.
    If you right-click a layer in the Drawing Explorer, there is an interesting entry: 'Remove Viewport Overrides'. This would seem to be the right tool for the job. But somehow I can't get it to work.

    One thing you can do to analyse the problem is create an ASCII DXF from the dwg and do a text search for the layer name.
  •  It may be that there is a VP override, but if purging that is not working, then I don't think I want to pursue it further.  One way to deal with it, since I expect to create more layers over time, is to just rename the layer and use it.

    I will contact technical support about why layers can't be merged and ask them for advice.

    -Joe
  • Hi Joe,

    Perhaps the drawing holds some multileader definitions? These can in turn reference blocks, text styles etc.. Currently the purge command ignores these definitions. I've previously raised SR44056 on this.

    Have you tried using -WBLOCK *  This should remove unreferenced data.

    Regards,

    Jason Bourhill

    CAD Concepts


  • Hi Joe,

    Further to my previous post, potentially your issue could also be due to empty text objects. It is possible to strike these when working with old .dwg files from AutoCAD, and files generated in BricsCAD.

    In BricsCAD empty text strings can be created by double clicking on some MTEXT/TEXT, deleting all the text in the editor, then picking the OK button. I believe some users may inadvertently use this as a method to delete text instead of using the _ERASE command. With ATTDEF you can remove the tag value via the property bar. I have raised SR45598 on this.

    I've attached a sample drawing, and a LISP routine that i've used to remove these objects.

    Regards,

    Jason Bourhill

    CAD Concepts


    EmptyText.dwgNoEmptyText.lsp

  • ... More additions:

    1.
    When I said 'do a text search' I meant: Open the dxf in Notepad(++) and search for the text there. This does not take very long.

    2.
    The 'Remove Viewport Overrides' tool works for other layer overrides but not for VP freeze. Note: you have to use _REGEN to see the effects of the tool.

    3.
    Some applications will use the same mechanism as VP freeze (xdata) to store layers.
  •  The new version 14.10 fixes the problem with right-clicking on a layer name in the Layer Explorer, and choosing delete or merge.  Now you can delete layers, even if they are frozen or have viewport overrides.  If there are objects on that layer, you are even offered the choice of moving them to another layer.

    However, note that 14.10 won't work if you have Norton Anti-Virus running. It quarantines the license manager and another file, which must be manually removed from the quarantine before the new version will work.

    -Joe
  • Joe,

    I periodically find layers that I can't purge, which don't appear  on the drawing, or in any block.    I have found that when I copy all the objects in the drawing to a new drawing, I can then purge the misbehaving layer.    I have also used this technique to get rid of some objects that REFUSED deletion.  
  • That often works for me, mostly the unused/unpurgeable layers etc just disappear.
  • I finally tracked down one unpurgable layer as associated with an attribute in my title block.  Note that the attribute was not on the problem layer.  Here is the story; 

    On one drawing that had become a bit too complex to manage, I decided to divide the drawing into two. So, I created a copy and removed the layouts I didn't want on this version, and deleted the related objects in Model space.  But, I ended up with quite a number of unpurgable layers.

    So, I decided to go through the effort to really solve this;
    1-Started a new drawing
    2-Pasted all model space objects.  The problem layers did not come in.
    3-Recreated each layout tab by using "from template" to copy each tab from the drawing with the unpurgable layers. The problem layers appeared.
    4-Thawed all layers in all viewport tabs.  I was able to purge most of the problem layers.

    I still ended up with one unpurgable layer.  I eventually realized it was associated with the title block.  There were no objects on the problem layer that I could select. Redefining the titleblock, after confirming the problem layer was not in the external DWG with the titleblock, did not remove the problem layer.

    The problem layer is apparently in an attribute.  If I do a ref-edit and delete all the attributes, then layer is still unpurgable.  But, if I insert a new copy, so the attributes are not showing, then I finally can purge the layer.

    -Joe
  • Joe, your problem is that attributes references are more or less independent from the block definition. You should look into the _BATTMAN and _ATTSYNC commands.
  •  New problem related to unpurgable layers.  I have a drawing of a large warehouse facility with many layers. So, I decided to simplify it by putting it into several different drawings.  The commonly repeated objects would be in an X-ref. Then, I would start to group the various kinds of details in drawings that had the Xref of the main facility.

    However, at some point I decided to rename the Xref to be a much shorter name, so that I could see the layer names in the drop down list of layers. Otherwise, the way the layer names are appended to the name of the X-ref would make them too long to read.  However, the old layer names seem to be stuck in the drawing, even when I deleted the X-ref, and made sure all of its layers were thawed in every viewport.

    I cannot purge the layers that were in the X-ref.

    Also, I have a vague recollection that there was some way to change the behavior of how layers in an X-ref were treated.  Again, this is a very vague memory, so it may not be true.  Is there a way to make X-ref layers that have the same name as layers in the host drawing, just use the same layer name, and not append it to the name of the Xref?

    -Joe
  • Did you try to set VISRETAIN off before purging the layers?
    And no, an xref will always prepend its name to dependent symbol table entries - otherwise, what would happen if you renamed an entry that is shared between the host drawing and a xref?
  •  Thank you Mr Hohenberg for that idea.  By turning Visretain off, and then saving and closing the drawing, when I re-opened it, the problem layers were gone.  Note that I first tried purging them, but that had no effect.  The save/close/reopen did it, and no purge was needed.  The only drawback is that I just lost the last hour of work resetting the VP Layer settings that I lost by converting part of my drawing to an X-ref.

    I think the issue of the layer naming convention that I am recalling was actually related to when a layer in an X-ref is bound or attached.  

    I wonder what happens to all my viewport layer settings when it is bound? - Good news, the viewport layers settings seem to be retained whether it is bound or attached.  However, I suspect in the attached method it may be more complex if there are common layer names between the host drawing and the xref.

    It is ironic that my attempt to simply the drawing made it more complicated and added many more layers.

    -Joe
  • It may be possible to go to the un-purgable layer and use -LAYER and freeze all, then erase ALL and see if anything deleted.  If nothing deleted, then UNDO the freeze.  Often persistent blocks are the problem.

    Dik
This discussion has been closed.