Jump to content

Recommended Posts

Posted

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!

Posted (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 by mhupp
little error handling

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...