Jump to content

Pedit command stop repeting


wimal

Recommended Posts

(command "pedit"lp1"C"ssset)

lp1 is the last entity (pline) added to selection set.

 

With using above code I can close the all plines which selected.

But I cant exit from the command to go to next step.

Please correct the code.

Link to comment
Share on other sites

Pedit ask for single or multi selection option. as you are passing last entity pedit will play with that entity only not with other entities which you are trying to get from ssget.

What exactly you want to do?

Link to comment
Share on other sites

(command "pedit"lp1"J"ssset"""")
(command "pedit"lp1"C"ssset"""")

 

Upto this position it is ok.I can get closed polyline.

But I cant exit from pedit command. It is repeating.

 

Even in normal autocad command without using lisp.

We have to press Esc. button to exit pedit command.

 

 

Please explane me how can I write a code using vla-put-closed to close the polyline in selection set.

Link to comment
Share on other sites

Please explane me how can I write a code using vla-put-closed to close the polyline in selection set.

 

(if (setq sset (ssget ":L"'((0 . "*POLYLINE"))))
 (repeat (setq i (sslength sset))
   ([color=blue]vla-put-closed[/color] (vlax-ename->vla-object (ssname sset (setq i (1- i)))) [color=blue]1[/color] )
   )
)

Link to comment
Share on other sites

Removed does work , lots of commands require a enter or esc to finish just make sure you have correct "" this may be the problem "" "" note space between.

Edited by BIGAL
Link to comment
Share on other sites

If you use VL so easy

 

(setq obj (vlax-ename->vla-object (car (entsel))))
(vla-put-closed obj -1) ; closed pline
(val-get-closed obj) ; it returns 0 if it is open

Link to comment
Share on other sites

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