Print Page | Close Window

autolisp need help

Printed From: CAD Forum
Category: EN
Forum Name: AutoCAD
Forum Description: Discussion about AutoCAD and AutoCAD LT, viewers, DWG and DWF formats, Design Review, AutoCAD 360, add-ons
URL: https://www.cadforum.cz/forum_en/forum_posts.asp?TID=787
Printed Date: 20.Apr.2026 at 00:42


Topic: autolisp need help
Posted By: samlimct
Subject: autolisp need help
Date Posted: 30.May.2008 at 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



Replies:
Posted By: maungthantzinoo
Date Posted: 03.Jun.2008 at 11:45
You try below lisp instead of your...

(command
"pedit" "m" (ssget) "" "y" "j" "" "")(terpri)
  )






Posted By: samlimct
Date Posted: 03.Jun.2008 at 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 help

sam



Print Page | Close Window