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

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    814x  
Comments   Tell a friend
applies to: AutoCAD ·

See also:
Tip 11198:Justified attribute text in mirrored blocks (AutoCAD)
Tip 11063:AutoCAD installation prompts to "Insert Disc 1".
Tip 10986:FATAL ERROR: Unhandled Access when displaying a layout with rendered view
Tip 10628:Ugly (jaggy) TrueType texts in DWG drawing.
Tip 10414:FATAL ERROR when starting AutoCAD 2016 - Access Violation Reading 0x0018.


Back   All CAD Tips All CAD tips&tricks

How to map properties from an imported STEP file to Inventor? « | » How to copy Revit custom colors to another PC?

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:
Increase your productivity with our set of add-on functions for AutoCAD Civil 3D
CADstudio Civil Tools More info


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