- (defun c:test (/ mysset counter laylist p1 sch xtxt ytxt)
- (setq laylist (list "NORTH" "EAST" "NUM"))
- (foreach x laylist
- (if (tblsearch "Layer" x)
- (command "._layer" "_thaw" x "_on" x "_unlock" x "_set" x "") ;_ closes command
- (command "._layer" "_make" x "_color" "7" x "") ;_ closes command
- )
- )
- (prompt "SELECT POINTS JASON: ")
- (setq mysset (ssget '((0 . "POINT"))))
- (setq counter 0)
- (if (null sch)
- (setq sch 1.0)
- )
- (initget 6)
- (setq temp (getreal (strcat "\nENTER SCALE <" (rtos sch 2 2) ">: ")))
- (if temp
- (setq sch temp)
- (setq temp sch)
- )
- (while (< counter (sslength mysset))
- (setq p1 (cdr (assoc 10 (entget (ssname mysset counter)))))
- (setq xtxt (strcat "E" (rtos (car p1) 2 3)))
- (setq ytxt (strcat "N" (rtos (cadr p1) 2 3)))
- (command "text" p1 (* sch 2.5) "0" xtxt)
- (command "_change" (entlast) "" "p" "la" "EAST" "")
- (command "text" "" ytxt)
- (command "_change" (entlast) "" "p" "la" "NORTH" "")
- (command "text" "" (itoa (1+ counter)))
- (command "_change" (entlast) "" "p" "la" "NUM" "")
- (setq counter (+ counter 1))
- ) ;_ end of while
- (princ)
- )
|