CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz]
Cesky English Deutsch
Login/Register:
 Visitors: 3176 

CAD tip CAD tip # 11017:

Question CAD 
 %  platform  category 
Q - question

How to select a DWG object by its internal ID, its "handle"?

A - answer Each drawing object in a DWG file can be identified by its unique ID, a hexadecimal code which does not change through the DWG editing history. Any object (entity) is unambiguously identified by this hexadecimal number code.

If you need to find or select an object by this code, e.g. coming from an error message, you can use the LISP function (handent).

Then you can e.g. delete the complaining object with the command:

(entdel(handent "36A41"))
typed on the command line (replace the sample code 36A41 with your specific hexadecimal handle - the index, listed in the AutoCAD warning message).

To temporarily highlight the object before deleting, you can also use:

(redraw(handent "36A41")3)

To zoom to a specific object - if it is a visible drawing geometry object, use:

_ZOOM _O (handent "36A41") [Enter] [Enter]

or:

(command "_ZOOM" "_O" (handent "36A41") "")

ACAD
100% *  CAD 
26.7.2016    7596×  
Prices - CAD eShop:
applies to: AutoCAD ·

See also:
Tip 12546:How to renumber handles of selected DWG entities?
Tip 12403:Get center point of a group of selected objects.
Tip 12297:Which CAD formats are supported in the Autodesk Manufacturing Data Exchange Utility?
Tip 12233:How to compare two 3D mesh models and find differences/changes?
Tip 12105:Select the smallest DWG object - MinOf utility.


Back   All CAD Tips All CAD tips&tricks



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:
Track your time spent working on AutoCAD or Revit jobs - automatically with
CADstudio JobTime More info


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