Jump to content

How Can I make this work????


MikeP

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

)

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