Jump to content

Recommended Posts

Posted
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???

  • Replies 126
  • Created
  • Last Reply

Top Posters In This Topic

  • Lee Mac

    43

  • AQucsaiJr

    34

  • fuqua

    19

  • tony barretto

    5

Top Posters In This Topic

Posted Images

Posted
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?

Posted
sweet thank you ! that did the trick :D

 

Your welcome,

 

Just pointed you in the right direction! Thanks for sharing your findings on the text justification

Posted

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.

Posted
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.

Posted

This is perfect... I can definitely use this... Thank you for your help.

Posted
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.

Posted
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 :)

Posted
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.

Posted

When I click on these files, they bring me to a page that says I need to contact an administrator?

Posted

got it... I'll give them a try.

Posted

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?

Posted
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

Posted

Got it... Thanks... I'll let you know my results.

Posted

WOW!!! Very cool... I can use this... I like the menu pop-up, very helpful... Thank you very much for all your help.

Posted
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 :thumbsup:

Posted

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.

Posted

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.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...