Scrimski Posted June 17, 2009 Share Posted June 17, 2009 Another question.... How would I get the numbers, in the vertical Y form, to go from 1 to whatever, from top to bottom rather than bottom to top, as it is doing now? Try a negativ spacing -> is that what you want??? Quote Link to comment Share on other sites More sharing options...
Scrimski Posted June 17, 2009 Share Posted June 17, 2009 This works great... One question though... What would I type in the prefix and suffix if I want it to be blank? Sorry my fault -> doesn't work currently What do you wish?? Do you want any default value? Quote Link to comment Share on other sites More sharing options...
jammie Posted June 17, 2009 Share Posted June 17, 2009 sweet thank you ! that did the trick Your welcome, Just pointed you in the right direction! Thanks for sharing your findings on the text justification Quote Link to comment Share on other sites More sharing options...
AQucsaiJr Posted June 17, 2009 Author Share Posted June 17, 2009 Wish?? I don't wish... I do appreciate the help with this because it will save me alot of time creating these term racks.... Making the spacing a negative value did the trick... I would like to be able to use a prefix and suffix, but in some cases I would like to have the prefix and suffix blank as well. I can't thank you enough for your help... I hope I can learn how to write these LISP files on my own soon.... They seem very useful. Quote Link to comment Share on other sites More sharing options...
Scrimski Posted June 17, 2009 Share Posted June 17, 2009 I hope I can learn how to write these LISP files on my own soon.... They seem very useful. Useful yes, but i think it is hard to learn, not the basics (the lisp basics are easy), but there are a lot of tricks and pitfalls if you go further. (defun c:num (/ tmpVars pt ang sNum*) (setq dVars '(sNum eNum inNum Spc Pref Suff tsize Dir)) (mapcar '(lambda (x y) (or (boundp x) (set x y))) dVars '(1 10 1 1 "" "" 2.5 "X")) (setq tmpVars (list (getreal (strcat "\nSpecify Starting Number <" (rtos sNum 2 0) ">: ")) (getreal (strcat "\nSpecify Ending Number <" (rtos eNum 2 0) ">: ")) (getreal (strcat "\nSpecify Increment <" (rtos inNum 2 0) ">: ")) (getreal (strcat "\nSpecify Spacing <" (rtos Spc 2 2) ">: ")) (getstring (strcat "\nSpecify Prefix <" (if (eq "" Pref) "-None-" Pref) ">: ")) (getstring (strcat "\nSpecify Suffix <" (if (eq "" Suff) "-None-" Suff) ">: ")) (if (not(setq tmptsize (getreal (strcat "\nSpecify Textsize <" (if (eq nil tsize) "-None-" (rtos tsize)) ">: ")))) tsize tmptsize) )) (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)) (strcat Pref (rtos sNum* 2 0) Suff) tsize) (setq sNum* (+ sNum* inNum) i (1+ i)))) (princ)) (defun Make_Text (pt val tsize) (entmake (list (cons 0 "TEXT") (cons 8 (getvar "CLAYER")) (cons 10 pt) (cons 62 2) (cons 40 tsize) (cons 1 val) (cons 50 0.0) (cons 7 (getvar "TEXTSTYLE")) (cons 71 0) (cons 72 1) (cons 73 2) (cons 11 pt)))) This is a easy code, so it is fun for me to help you. Now you can use blanks, but the previous input is not saved. Quote Link to comment Share on other sites More sharing options...
AQucsaiJr Posted June 17, 2009 Author Share Posted June 17, 2009 This is perfect... I can definitely use this... Thank you for your help. Quote Link to comment Share on other sites More sharing options...
fuqua Posted June 17, 2009 Share Posted June 17, 2009 This works great... One question though... What would I type in the prefix and suffix if I want it to be blank? nothing mate, when it asks for the first time upon loading just enter over it, leave it blank. Quote Link to comment Share on other sites More sharing options...
fuqua Posted June 17, 2009 Share Posted June 17, 2009 Your welcome, Just pointed you in the right direction! Thanks for sharing your findings on the text justification np mate, im new to this lisp routines, so i would like to help as much my limited knowledge about this allows me Quote Link to comment Share on other sites More sharing options...
AQucsaiJr Posted June 17, 2009 Author Share Posted June 17, 2009 nothing mate, when it asks for the first time upon loading just enter over it, leave it blank. It did not work for me like that... If I tried to enter over it, after entering anything, it would keep asking the question If I left it blank... But the last LISP files solved the problem. Quote Link to comment Share on other sites More sharing options...
AQucsaiJr Posted June 18, 2009 Author Share Posted June 18, 2009 When I click on these files, they bring me to a page that says I need to contact an administrator? Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted June 18, 2009 Share Posted June 18, 2009 A bit late, I know, but I managed to find the time to upgrade it Make sure that the DCL is saved in your search path Lee AutoNum.dcl AutoNum.lsp Quote Link to comment Share on other sites More sharing options...
AQucsaiJr Posted June 18, 2009 Author Share Posted June 18, 2009 got it... I'll give them a try. Quote Link to comment Share on other sites More sharing options...
AQucsaiJr Posted June 18, 2009 Author Share Posted June 18, 2009 I thought I could figure it out through the help menu but I am having trouble.... What do I do with the .dcl file you provided? Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted June 18, 2009 Share Posted June 18, 2009 I thought I could figure it out through the help menu but I am having trouble.... What do I do with the .dcl file you provided? Just save it to your AutoCAD Search Path. The Standard Search path is Program Files > AutoCAD XXX > Support. You can also add to the search path listings by going to Tools > Options > Files (tab) > Support File Search Path Quote Link to comment Share on other sites More sharing options...
AQucsaiJr Posted June 18, 2009 Author Share Posted June 18, 2009 Got it... Thanks... I'll let you know my results. Quote Link to comment Share on other sites More sharing options...
AQucsaiJr Posted June 18, 2009 Author Share Posted June 18, 2009 WOW!!! Very cool... I can use this... I like the menu pop-up, very helpful... Thank you very much for all your help. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted June 18, 2009 Share Posted June 18, 2009 WOW!!! Very cool... I can use this... I like the menu pop-up, very helpful... Thank you very much for all your help. No problem I've tried to add as much error handling as I can, but I haven't tested it completely, so let me know if you find any bugs Quote Link to comment Share on other sites More sharing options...
AQucsaiJr Posted June 18, 2009 Author Share Posted June 18, 2009 It is the least I could do... I will let you know of any findings! I know I must be annoying at this point with all the requests but I was thinking and, well, would it be difficult to add the ability of the place on click option , like your first LISP file had, as well as the spacing option that is currently uses? If it is to much work please don't bother... This is designed perfectly to what I had asked in the beginning and will provide me hours of saved time. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted June 18, 2009 Share Posted June 18, 2009 See here: http://www.cadtutor.net/forum/showthread.php?t=35234 I may upgrade the above LISP also. You will notice that the DCL for this was modelled from the one above. Quote Link to comment Share on other sites More sharing options...
AQucsaiJr Posted June 18, 2009 Author Share Posted June 18, 2009 Wow... Too Cool... You can make a write up about this one now too!!! They will both be very useful to me... I can't thank you enough... I hope, sometime down the road, I can figure out how to make these programs for people in, what was, my predicament... Thank you, very much, for the help. Quote Link to comment Share on other sites More sharing options...
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.