Would you like to react to this message? Create an account in a few clicks or log in to continue.

northing value lisp

Go down

northing value lisp Empty northing value lisp

Post by roldanulep Mon Apr 28, 2014 10:27 pm

share ko lang itong lisp na ginawa ko.
cons 7 = textstyle
cons 8 = layer name
cons 40 = text height

pag nagustuhan nyo ipopost ko rin ung sa easting.
ginagamit ko ito sa mga plans na wala sa true north.

(defun C:NY ()
  (setq |CMDECHO| (getvar "cmdecho"))
  (setvar "cmdecho" 0)
  (setvar "osmode" 512)
  (setq PT1 (getpoint "Pumili ng insertion point: "))
  (setq PT2 (getpoint pt1 "\nPiliin ang direksyon ng text: "))
;;;Text data
  (setq TAG (strcat "N "(rtos (cadr PT1) 2 0)))
  (setq ang (angle PT1 PT2))
  ;;;TEXT TO PRINT ON SCREEN
  (entmake (list
      (cons 0 "MTEXT")
      (cons 100 "AcDbEntity")
      (cons 100 "AcDbMText")
      (cons 7 "Standard")
      (cons 8 "G-TX25")
      (cons 71 7)
      (cons 72 1)
      (cons 73 1)
      (cons 10 PT1)
      (cons 11 (list 1.0 0.0 0.0))
      (cons 50 ANG)
      (cons 41 14)
      (cons 40 (* 1 2.5))
      (cons 44 1.0)
      (cons 1 TAG)
    )
  )
  (setvar "osmode" 0)
  (setvar "cmdecho" 1)
  (redraw)
  (princ)
)
roldanulep
roldanulep
CGP Newbie
CGP Newbie

Number of posts : 154
Age : 37
Location : Makati City;Ilocos Norte
Registration date : 23/02/2011

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum