Jump to content

Recommended Posts

Posted

This is what I am asking

 

user picks a point

(setq pt1 (getpoint "\npick point"))

 

I want to do this..

if pt1 is a line or poly line

save entity name as Blank

else

do nothing

 

Is this something simple that I just cant figure out the correct way to write it?

 

Posted

In case anyone wanted an answer on what I did...

originally I did this after Ron gave me the link.

  (setq pt1 (getpoint "\npick START point"))
(setq srt (nentselp pt1))

 

Then read a bit more and realized I only wanted it to save if it was a polyline and couldn't get nentselp to work right for me so went with

(setq pt1 (getpoint "\npick START point"))
(setq srt (ssget pt1 '((0 . "LWPOLYLINE")))

 

Thanks for the push down the right path Ron. So many different ways to do things is there ever a "right way"?

Posted

Why is it important to use a point as the pick?

Posted
 (if (= srt nil)
             (progn
              (command "pedit" "m" pl pl1 ar "" "y" "j" "" "");	joins all the segments!
             )
              (command "pedit" "m" pl pl1 ar srt "" "y" "j" "" "");	joins all the segments!
            )

for later on

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...