View Full Version : How Can I make this work????
MikeP
28th Oct 2009, 04:36 pm
(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.
lpseifert
28th Oct 2009, 04:41 pm
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)
)
MikeP
28th Oct 2009, 04:48 pm
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??
lpseifert
28th Oct 2009, 05:03 pm
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" "s" "");do the pedit stuff on the selection set
(setvar "peditaccept" pa);restore the peditaccept variable
(princ);clean exit
);end of defun
)
Powered by vBulletin™ Version 4.1.2 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.