northing value lisp
:: Tutorials :: Autocad Tutorials
Page 1 of 1
northing value lisp
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)
)
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- CGP Newbie
- Number of posts : 154
Age : 37
Location : Makati City;Ilocos Norte
Registration date : 23/02/2011
:: Tutorials :: Autocad Tutorials
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|