CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz]
CZ | EN | DE
Login or
registration
  Visitors: 19519

CAD tip CAD tip # 12210:

   
Question CAD 
 %  platform  category 
Q - question

How to erase a specific object type in all DWG layouts?

A - answer The standard command ERASE allows to interactively select the objects-to-be-erased only from the current layout, model- or paperspace.

If you want to select and erase a given object type - e.g. a specific block or texts containing a specific string - in all layouts of your curretn DWG drawing, use the following LISP utility DelInLo. Build the selection filter using the LISP function (ssget), or make use of the interactive function (ssx) from Express Tools.

; Delete in all layouts, www.cadstudio.cz 2019

(defun C:DelInLo ( / ss)
 (vl-load-com)
 (load "SSX.LSP" "Express Tools not installed")
 (princ "\nSelect objects to delete in all layouts, by a filter or example")
 (if (setq ss (ssx))
  (foreach x (mapcar 'cadr (ssnamex ss))(vla-delete (vlax-ename->vla-object x)))
 )
 (princ)
)

(princ "\nDelInLo command loaded.")(princ)

Save the LISP code above to the file DelInLo.lsp (or download it from Download), load it into your AutoCAD with APPLOAD and type the command DELINLO. Use the filter to select the requested objects to delete.

We recommend first to update the filtering function SSX from Express Tools with our extended version, with the tool SSX, which can be downloaded from Download - the copy it to the folder "Express" in your AutoCAD installation.

ACADADTCivilPlantMechMap
100% *  CAD 
16.4.2019    9983×  

See also:
Tip 10015:How to select and modify objects in ALL layouts of the DWG?
Tip 7082:Selecting block objects by name.


Back   All CAD Tips



Have we helped you? If you want to support the CAD Forum web service, consider buying one of our CAD applications, or our custom software development offerings, or donating via PayPal (see above). You may also add a link to your web - like this "fan" link: CAD Forum - tips, utilities, blocks for Autodesk products
CAD:    OS:    Categ: 
Text:  FAQ glossary   



Featuring:
Extend your AutoCAD LT productivity with our popular add-on
CADstudio LT Extension More info


Please use these tips at your own risk.
Arkance Systems is not responsible for possible problems that may occur as a result of using any of these tips.
TOPlist