wimal Posted February 4, 2016 Share Posted February 4, 2016 (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. Quote Link to comment Share on other sites More sharing options...
hanhphuc Posted February 4, 2016 Share Posted February 4, 2016 Suggestion vla-put-closed Quote Link to comment Share on other sites More sharing options...
satishrajdev Posted February 4, 2016 Share Posted February 4, 2016 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? Quote Link to comment Share on other sites More sharing options...
BIGAL Posted February 4, 2016 Share Posted February 4, 2016 You may need to do a loop of each ssset and close not sure (command "pedit"lp1"C"ssset) (command "pedit" lp1 "C" ssset) Quote Link to comment Share on other sites More sharing options...
wimal Posted February 4, 2016 Author Share Posted February 4, 2016 (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. Quote Link to comment Share on other sites More sharing options...
wimal Posted February 4, 2016 Author Share Posted February 4, 2016 How can I exit from this. Need a lisp code. Quote Link to comment Share on other sites More sharing options...
hanhphuc Posted February 4, 2016 Share Posted February 4, 2016 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] ) ) ) Quote Link to comment Share on other sites More sharing options...
satishrajdev Posted February 4, 2016 Share Posted February 4, 2016 How can I exit from this. Need a lisp code. Better, Post you code to understand its flow and your need according to it Quote Link to comment Share on other sites More sharing options...
BIGAL Posted February 5, 2016 Share Posted February 5, 2016 (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 February 5, 2016 by BIGAL Quote Link to comment Share on other sites More sharing options...
tombu Posted February 5, 2016 Share Posted February 5, 2016 Of course if all that's needed is to close all selected polylines just change Close to Yes in Properties. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted February 5, 2016 Share Posted February 5, 2016 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 Quote Link to comment Share on other sites More sharing options...
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.