satishrajdev Posted April 18, 2012 Posted April 18, 2012 Dear all, i have one lisp which works for assigning numbers ( e.g. 1, 2, 3) but i want that assigning in NS01, NS02 Format, Can anybody have any clue to edit it plz reply soon lisp is as follow:- (defun c:AssignNumber(/ nnn muksek a nno) (command "undo" "BEgin") (GeneralAcadTRKSettings) (setvar "cmdecho" 0) (if (= olcek nil) (load "olcek") ) (command "DSETTINGS") (princ "Initial Number (if (/= do nil) (princ do) ) (princ ">:") (setq nno (getint)) (if (= nno nil) (terpri) (setq do nno)) (princ "Number Height (princ yuksek) (princ ">:") (setq muksek (getreal)) (if (= muksek nil) (terpri) (setq yuksek muksek)) (setq do (- do 1)) (while (/= nnn 1000) (setq do (+ do 1)) (princ"\nNo:") (princ do) (setq a (getpoint " Place: NS")) (if (/= a nil) (progn (command "text" a yuksek 100 do) ) (setq nnn 1000) )) (command "undo" "End") (princ) ) Quote
Lee Mac Posted April 18, 2012 Posted April 18, 2012 This may help: http://lee-mac.com/numinc.html Quote
MSasu Posted April 18, 2012 Posted April 18, 2012 Something like this? (setq aString (strcat "NS" (if (<= do 9) "0" "") (itoa do))) (command "_TEXT" a yuksek 100 aString) Also, please edit your post to add code tags. Thank you. Quote
satishrajdev Posted April 18, 2012 Author Posted April 18, 2012 thanks both of you interest @Lee Mac.......... I tried that tool, it really has made my work lot more easier, thank a lot @MSasu............I have edited lisp as your suggestion and lisp is now working perfectly for me....thanks a lot Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.