Jump to content

Recommended Posts

Posted

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

Posted

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?

Posted

You may need to do a loop of each ssset and close

 

not sure (command "pedit"lp1"C"ssset) (command "pedit" lp1 "C" ssset)

Posted

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

Posted

How can I exit from this. Need a lisp code.

pedit.PNG

Posted

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] )
   )
)

Posted
How can I exit from this. Need a lisp code.

 

Better, Post you code to understand its flow and your need according to it

Posted (edited)

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
Posted

Of course if all that's needed is to close all selected polylines just change Close to Yes in Properties.

Posted

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

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