danglar Posted July 25, 2018 Share Posted July 25, 2018 I wrote a lisp to return the name of selected Xref (see attached one) The first part of this routine make Xref highlighted and the second one returns the Xref name in alert box all these functions I put in a endless loop Actually I need to pick twice on certain Xref to highlight it and to get it's name Is it possible to combine to of these functions in a one in order to make only one pick on Xref? Any help will be very appreciated Xref Name - XX.lsp Quote Link to comment Share on other sites More sharing options...
hanhphuc Posted July 25, 2018 Share Posted July 25, 2018 (defun c:test (/ en s) (prompt "\nSelect an xref or block to get it name : ") (or (while (setq s (ssget "_:S:E+." '((0 . "INSERT")))) (if en (redraw en 4) ) (and (setq en (ssname s 0)) (progn (redraw en 3) (alert (strcat "XREF/block name :\n" (cdr (assoc 2 (entget en)))))) ) ) (alert "\nOops! no XREF or block selected?") ) (princ) ) Quote Link to comment Share on other sites More sharing options...
danglar Posted July 25, 2018 Author Share Posted July 25, 2018 Thank you hanhphuc All working perfect. I just make a little modification (see attached one): Then you push "enter" - function make regeneration in order to cancel loop and Xref highlighting Xref Name - XX.lsp Quote Link to comment Share on other sites More sharing options...
hanhphuc Posted July 25, 2018 Share Posted July 25, 2018 Thank you hanhphucAll working perfect. I just make a little modification (see attached one): Then you push "enter" - function make regeneration in order to cancel loop and Xref highlighting no worries. you are welcome p/s: without lisp - just activate properties window Quote Link to comment Share on other sites More sharing options...
ronjonp Posted July 25, 2018 Share Posted July 25, 2018 See HERE too. Quote Link to comment Share on other sites More sharing options...
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.