ChristopherM Posted July 7, 2021 Posted July 7, 2021 Hi I am trying to figure out how to select an entity by its handle but there is not much info on the topic. What I did find out was that there is a HANDENT command to select the object but it is not working for me. I am on AutoCAD 2018. And I type in HANDENT then press spacebar to type in the ID "45b" but as soon as I press space it tells me unknown command. Is this a LIPS I need to load ? Where to find it though ? Also tried HANDENT"45b" but no luck :D How to find/select an object by its handle ? Quote
CyberAngel Posted July 7, 2021 Posted July 7, 2021 HANDENT is an AutoLISP command, not an AutoCAD command. If you don't know AutoLISP yet, you may want to find another way to do whatever it is you're doing. On the other hand, you may want to start learning AutoLISP, because it's very handy for writing custom commands. Quote
ChristopherM Posted July 7, 2021 Author Posted July 7, 2021 I see, thanks for the clear up. I will rephrase my question then. How to find/select an object by its handle in AutoCAD 2018? Trying to find Entity with Handle 45B on a drawing. Quote
tombu Posted July 7, 2021 Posted July 7, 2021 Selecting or zooming to an entity based on its handle identification code To select an entity based on its handle ID On the command line enter _SELECT When prompted to select objects, enter (HANDENT "HandleID") where HandleID is the handle identification value of the entity. The entity will be selected and highlighted, and you can either continue selecting entities or press ENTER to end the command. To zoom to an entity based on its handle ID On the command line enter _ZOOM Select the Object option. When prompted to Select Objects, enter (HANDENT "HandleID") where HandleID is the handle identification value of the entity. Once the object is selected press ENTER to Zoom to this object. 1 Quote
ChristopherM Posted February 4, 2022 Author Posted February 4, 2022 Somewhat super late. Thanks for the explanation on how to use it. But seems to miss the very basic where do I get the HANDENT autolisp. I am assuming I need to download the file and load it in CAD to be able to use it? But don't seem to be able to find it anywhere. Or am I still at a loss on how this works Quote
eldon Posted February 4, 2022 Posted February 4, 2022 Did you follow the link given? All the information is given, but needs to be read. 1 Quote
ChristopherM Posted February 5, 2022 Author Posted February 5, 2022 22 hours ago, eldon said: Did you follow the link given? All the information is given, but needs to be read. Lol sigh people, smarty pants same goes for my post. As you see on the top. Writing HARDENT like the link says gives me the error unknown command. 1 Quote
Warren E. Black Posted February 5, 2022 Posted February 5, 2022 Apparently you did not read the above post 1 Quote
steven-g Posted February 5, 2022 Posted February 5, 2022 36 minutes ago, ChristopherM said: Writing HARDENT like the link says gives me the error unknown command. At some point the lighgtbulb will go on. Lisp has to be contained in parenthesis () there is nothing to download it is built in re-read @tombu's post above and include the (). And it is HANDENT not HARDENT Or is your profile not correct and you are actually using LT and not the full version of Autocad in which case nothing will help as Lisp is not found in LT 1 Quote
eldon Posted February 5, 2022 Posted February 5, 2022 44 minutes ago, ChristopherM said: .....As you see on the top. Writing HARDENT like the link says gives me the error unknown command. Unfortunately you were not advised to write HARDENT, you were advised to write (HANDENT .... AutoCAD needs to have a way to distinguish between AutoCAD commands and AutoLISP expressions. AutoCAD identifies an AutoLISP expression by its opening parenthesis. Each time AutoCAD detects an opening parenthesis, it passes the entire expression which follows to AutoLISP. AutoLISP evaluates the expression and returns the result to AutoCAD. AutoCAD uses the results and continues. A typical AutoLISP expression has this syntax: (function argument) It is a pity that you did not manage to discover this with your search of information. 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.