Author Topic: sSection line lisp does not work  (Read 1819 times)

0 Members and 1 Guest are viewing this topic.

drumbald

  • Guest
sSection line lisp does not work
« on: February 21, 2006, 01:06:33 PM »
If anyone can help me the folloeing command won't line up the text

Code: [Select]
(defun C:sel ()
  ;(setvar "CMDECHO" 0)
  ;(command "-units" " " "32" "1" "0" "0" "n")

    (defun RTD (A)
  (/(* a 180.0) PI)
    )
 
  (if (not (tblsearch "style" "GDI-LUCSANS-B"))
    (command "-style" "GDI-LUCSANS-B" "lsansd.ttf" "0" "1" "0" "n" "n")
  )
;;;    (command "-layer" "m" "_GDI-SECTION LINES" "C" "6" "" "")
 
  (setq SEC (getstring "\nPlease enter your section number.... ]"))
 
  (setq SCALE(getint"\nPlease enter your scale factor....]"))
  (setq a1-POINT(getpoint"\nPlease select section line starting point....]"))
  (setq b1-POINT(getpoint"\nPlease select section line ending point....]"))
  (setq ANG1(RTD(angle A1-POINT B1-POINT)))
  (setq TH(* 0.15 SCALE))
  (setq LL(* 0.45 SCALE))
  (setq LS(* 0.16 SCALE))
  (setq a2-point(polar a1-point 90 LL))
  (setq a2-point(polar a2-point 90 LS))
  (setq b2-point(polar b1-point 90 LL))
  (setq b2-point(polar b2-point 270 LS))
  ;********************** DRAW AREA *****************************************
    (setq LINEAL (ssadd))
  (command "line" a1-POINT b1-POINT "")
    (ssadd (entlast) LINEAL)
    (setq set1 (ssadd))
  (command "pline" a1-POINT "@0.0,0.2" "w" 0.09 0.0 "@0.0,0.25" "")
    (ssadd (entlast) set1)
    (setq TXT1 (ssadd))
  (command "text" "j" "br" a2-POINT TH "" SEC)
    (ssadd (entlast) TXT1)
  (command "scale" set1 "" A1-POINT scale)
  (command "scale" TXT1 "" A1-POINT scale)
  (command "rotate" set1 "" A1-POINT ang1)
  (command "rotate" TXT1 "" A1-POINT ang1)
  (command "change" TXT1 "" "" "" "" "" 0 "")
   ;********************** ARROW 2 *****************************************
    (setq set2 (ssadd))
  (command "pline" b1-POINT "@0.0,0.2" "w" 0.09 0.0 "@0.0,0.25" "")
    (ssadd (entlast) set2)
    (setq TXT2 (ssadd))
  (command "text" "j" "bl" b2-POINT TH "" SEC)
    (ssadd (entlast) TXT2)
  (command "scale" set2 "" b1-POINT scale)
  (command "scale" TXT2 "" b1-POINT scale)
  (command "rotate" set2 "" b1-POINT ang1)
  (command "rotate" TXT2 "" b1-POINT ang1)
  (command "change" TXT2 "" "" "" "" "" 0 "")

  (princ)
 
  (alert "This Lisp program was written by Craig Petersen \n(UPDATED 2/4/05) \n \nIt creates a section ")

  (princ)
)


« Last Edit: February 21, 2006, 05:01:48 PM by CAB »