Display full version of the post: autolisp need help

samlimct
30.05.2008, 10:29
(DEFUN C:Gq (/)  (GRAPHSCR) ; CHANGE TO GRAPHIC SCREEN  (SETQ L ( GETREAL" ENTER LENGTH OF GASKETS " )) (terpri)  (setq cog ( getpoint " enter corner of gasket " )) (terpri)  (setq x1 (car cog )) (terpri)  (setq y1 (cadr cog )) (terpri)  (setq x2 (+ x1 L)) (terpri)  (setq x3 (+ x1 L (/ L 2 ))) (terpri)  (setq x4 (+ x1 (/ L 2 ))) (terpri)  (setq ang (sin ( / pi 3 )))(terpri)  (setq height1 (* L ang )) (terpri)  (setq y3 ( + y1 height1)) (terpri)  (setq y4 ( + y1 height1)) (terpri)  (setq pnt1 ( list x2 y1 )) (terpri)  (setq pnt2 (list x3 y3 )) (terpri)  (setq pnt3 (list x4 y4 )) (terpri)    (command "line" cog pnt1 pnt2 pnt3 "c" "" ) (terpri)     (prompt " change polyline")(terpri)  (command " pedit"  "m" (ssget) "" "y" "j" cog pnt1 pnt2 pnt3 "")(terpri)  ) HI good morning all,i'm autolisp beginner. i had write the program on  the top but i trying to change the line into polyline. but doest'nt work. anyone can help to have a  check.thanks very much.... sam

maungthantzinoo
03.06.2008, 11:45
You try below lisp instead of your...(command "pedit" "m" (ssget) "" "y" "j" "" "")(terpri)  )

samlimct
03.06.2008, 17:36
hi your program only can be separate use for changing to polyline but does'nt work together with my grasket line.anyway thanks for your helpsam