Search the Community
Showing results for tags 'autonumbering'.
-
;; ============ Num.lsp =============== ;; ;; FUNCTION: ;; Will sequentially place numerical ;; text upon mouse click, with optional ;; prefix and suffix. ;; ;; SYNTAX: num ;; ;; AUTHOR: ;; Copyright (c) 2009, Lee McDonnell ;; (Contact Lee Mac, CADTutor.net) ;; ;; PLATFORMS: ;; No Restrictions, ;; only tested in ACAD 2004. ;; ;; VERSION: ;; 1.0 ~ 05.04.2009 ;; ;; ==================================== (defun c:num1 (/ dVars tmpVars pt ang sNum*) (setq dVars '(sNum eNum inNum Spc Dir)) (mapcar '(lambda (x y) (or (boundp x) (set x y))) dVars '(1 10 1 1 "X")) (setq tmpVars (list (getreal (strcat "\nSpecify Starting Number <" (rtos sNum 2 2) ">: ")) (getreal (strcat "\nSpecify Ending Number <" (rtos eNum 2 2) ">: ")) (getreal (strcat "\nSpecify Increment <" (rtos inNum 2 2) ">: ")) (getreal (strcat "\nSpecify Spacing <" (rtos Spc 2 2) ">: ")))) (initget "X Y") (setq tmpVars (append tmpVars (list (getkword (strcat "\nSpecify Direction [X/Y] <" Dir ">: "))))) (mapcar '(lambda (x y) (or (not x) (set y x))) tmpVars dVars) (if (eq Dir "X") (setq ang 0) (setq ang (/ pi 2))) (if (setq pt (getpoint "\nSpecify Start Point: ") i 0 sNum* sNum) (while (<= sNum* eNum) (Make_Text (polar pt ang (* i Spc)) (rtos sNum* 2 2)) (setq sNum* (+ sNum* inNum) i (1+ i)))) (princ)) (defun Make_Text (pt val) (entmake (list (cons 0 "TEXT") (cons 8 (getvar "CLAYER")) (cons 10 pt) (cons 62 2) (cons 40 (getvar "TEXTSIZE")) (cons 1 val) (cons 50 0.0) (cons 7 (getvar "TEXTSTYLE")) (cons 71 0) (cons 72 1) (cons 73 2) (cons 11 pt)))) how can i modify this code so that i can manually select the x and y cordinate for each incremented value .pls get me the modified code i am using a another program for the same but it not effective above the getint variable my numbering scheme are from 11111 to 99999