MikeP Posted October 28, 2009 Share Posted October 28, 2009 (defun c:PES (command "PEDIT" "M" "Y" "J" "0" "S") (princ) ) I need to select multiple polylines, then enter (Y) yes to convert to polylines, then need to (J) join, then (S) to create the splines. I want this done in once command. Quote Link to comment Share on other sites More sharing options...
lpseifert Posted October 28, 2009 Share Posted October 28, 2009 Try this. no spline though- edit as needed (defun c:pj () (setq pa (getvar "peditaccept")) (setvar "peditaccept" 1) (setq ssj (ssget )) (command "pedit" "m" ssj "" "j" "0.01" "") (setvar "peditaccept" pa) (princ) ) Quote Link to comment Share on other sites More sharing options...
MikeP Posted October 28, 2009 Author Share Posted October 28, 2009 Try this. no spline though- edit as needed (defun c:pj () (setq pa (getvar "peditaccept")) (setvar "peditaccept" 1) (setq ssj (ssget )) (command "pedit" "m" ssj "" "j" "0.01" "") (setvar "peditaccept" pa) (princ) ) isnt there a much easier to do this? I have no clue what going on here. do i add in the spline part?? Quote Link to comment Share on other sites More sharing options...
lpseifert Posted October 28, 2009 Share Posted October 28, 2009 If it was easy anyone could do it (defun c:pj (/ ssj);define a function as a command, declare local variables (setq pa (getvar "peditaccept"));get and store the peditaccept variable (setvar "peditaccept" 1);set the peditaccept variable to 1 (setq ssj (ssget ));get and store the selection set (command "pedit" "m" ssj "" "j" "0.01" [color=Magenta]"s"[/color] "");do the pedit stuff on the selection set (setvar "peditaccept" pa);restore the peditaccept variable (princ);clean exit );end of defun ) 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.