If you work extensively with AutoCAD data extraction, BIM workflows, or external databases, you have likely run into this frustrating scenario: You have a long list of Handle IDs in an Excel spreadsheet, and you need to find and highlight those exact objects in your drawing.
Manually typing
_HANDENT or searching for dozens of handles one by one is an absolute nightmare.While you could try setting up a complex, version-dependent OLE database connection, there is a much faster, foolproof way. In this post, we’ll show you how to use a simple, free AutoLISP routine to instantly read a list of handles and highlight all corresponding objects in AutoCAD simultaneously.
The Workflow Overview
Instead of forcing AutoCAD to read a live Excel file (which frequently crashes due to Microsoft Office version conflicts), we will:
- Copy the handles from Excel into a clean Text (.txt) file.
- Run a lightweight LISP script that reads the text file.
- Select all the matching drawing objects automatically.
Step 1: Prepare Your Handle List
- Open your Excel spreadsheet.
- Select and Copy (Ctrl+C) the column containing your target Handle IDs.
- Open Notepad (or any basic text editor) and Paste (Ctrl+V) the IDs.
- Save the file as
handles.txtsomewhere easy to find, like your Desktop.
Step 3: Run the Command in AutoCAD
Now, let's put the script to work inside your drawing:
- Open your target drawing in AutoCAD.
- Type
APPLOADin the command line and hit Enter. - Browse to your
HighlightHandles.lspfile, click Load, and close the dialog box. - Type the custom command shortcuts:
HHLand press Enter. - A file browser window will pop up. Select your
handles.txtfile and click Open.
Boom! The script instantly processes the database, grips the items, and highlights all matching objects on your screen. If any handles in your text file don't exist in the current drawing, the command line will gently warn you with a list of missing IDs.

No comments:
Post a Comment