Abrasive Posted June 30, 2022 Posted June 30, 2022 Is there a way to identify a unique line? For example, I want to name individual lines say "wing" or "spine" and then test for the name and run a command based on the name? I have a routine that draws lines but certain lines represent different functions in my drawings.... Thanks In Advance! Quote
mhupp Posted June 30, 2022 Posted June 30, 2022 (edited) Using the handle and ldata (defun C:SET (/) (vlax-ldata-put "Line" "wing" (cdr (assoc 5 (entget (car (entsel "\nSelect Line: ")))))) ) (defun C:RECALL (/ line) (if (setq line (vlax-ldata-get "Line" "wing")) (sssetfirst nil (ssadd (handent line))) (prompt "\nLine Not Saved Please Run Set Command") ) ) Edited July 22, 2022 by mhupp little error handling 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.