[Search tip detail and code files using keywords, tip number, author name, etc ]
 
    For tip to function correctly, you must ensure that the downloaded file name matches the file name
    displayed in the Rename File To field. Please rename downloaded files when necessary.
Erase Block Components Safely
Tip# 3684 By Leland Leahy On 17-Jul-2011
0
Rated By 0 users Downloaded : 147
Categories : 2D Editing, DWG
Software type : AutoCAD 2012
Rename File To : SafeErase.lsp
This alternative to the Erase command filters out xrefs so they are not erased.

One problem with blocks in AutoCAD, including xrefs, is that it is easy to select a component during editing commands that ends up affecting the entire block. One way to avoid this is to lock the layer on which the block/xref resides, but this is not always possible or desired. This routine from Leland Leahy is an alternative to the normal Erase command — it filters out xrefs from the selection so that they are not erased. With a little modification, the same principle could apply to any entity type. Start by loading the LISP file, then type in the command SafeErase. Proceed just as if you were using the built-in Erase command, and if any xref entities are selected, they will be omitted from the selection before the erase action occurs.   

 

Average Rating:
0


User comments


Log In