Jump to content

Is this worth a routine?


ILoveMadoka

Recommended Posts

Eldon, are you saying there is a setting somewhere to change the precision of the numbers returned in the command line (like from a dist inquiry)?

 

A quick way to change the precision is to type LUPREC, and then enter the number of decimal places required.

 

LUPREC is a shortening of Length Unit PRECision.

Link to comment
Share on other sites

  • Replies 33
  • Created
  • Last Reply

Top Posters In This Topic

  • Lee Mac

    9

  • ReMark

    8

  • alanjt

    5

  • ILoveMadoka

    4

Top Posters In This Topic

Posted Images

Lee:

 

My point is that we go looking for lisp routines to do things that are already part of the program and if set up properly (in a template) can be applied to each and every drawing automatically.

 

If I were too harsh then I apologize. That was not my intent.

 

Still, my response would be the same to the original question as posed "Is this worth a routine?" No, it isn't.

Link to comment
Share on other sites

Still, my response would be the same to the original question as posed "Is this worth a routine?" No, it isn't.

 

True, not being a draftsman, I cannot really comment as I don't know the all the commands/functionality that AutoCAD has to offer.

 

I suppose the only thing that my routine has over ACAD is that I can display 15 dp, whereas ACAD can only manage 8... (not that you'd ever need that many lol).

 

(defun c:dist2 (/ p1 p2 Units Prec)

 (setq Units [color=Red][b]2[/b][/color] Prec [color=Red][b]15[/b][/color])

 (and (setq p1 (getpoint "\nFirst Point: "))
      (setq p2 (getpoint "\nSecond Point: " p1))
      (princ (strcat "\nDistance: " (rtos (distance p1 p2) Units Prec))))

 (princ))

Link to comment
Share on other sites

In days long ago, when AutoCAD was started up, you had to tell it that you were going to be using AutoLISP, so that memory could be reserved for it. So you were careful as to how many lisps could be loaded, as you could run out of memory.

 

Nowadays, it seems that someone could use AutoCAD entirely by Lisp, and be sheltered from those nasty commands. :twisted:

Link to comment
Share on other sites

In days long ago, when AutoCAD was started up, you had to tell it that you were going to be using AutoLISP, so that memory could be reserved for it. So you were careful as to how many lisps could be loaded, as you could run out of memory.

 

Nowadays, it seems that someone could use AutoCAD entirely by Lisp, and be sheltered from those nasty commands. :twisted:

 

Makes you wonder if sometimes this site isn't merely facilitating Autocad ignorance.

Link to comment
Share on other sites

True Alan - we shouldn't write any more o:)

I seriously hope that really isn't how you interpret that statement.

 

Let's teach a person to think outside the box and explore the possibilities of what's available. And I don't mean individuals willing to hand out code snippets at the drop of a hat. If you want learn how to add, I teach you to add, not hand you a calculator and show you what buttons to push.

Link to comment
Share on other sites

I seriously hope that really isn't how you interpret that statement.

 

I was joking Alan :) There's no way I could give up coding lol..

 

If you want learn how to add, I teach you to add, not hand you a calculator and show you what buttons to push.

 

Nice analogy :thumbsup:

Link to comment
Share on other sites

I was joking Alan :) There's no way I could give up coding lol..

 

 

 

Nice analogy :thumbsup:

 

You were being sardonic and completely missing the point.

Link to comment
Share on other sites

A quick way to change the precision is to type LUPREC, and then enter the number of decimal places required.

 

LUPREC is a shortening of Length Unit PRECision.

 

Eldon, thanks. This worked nicely. I'm a bit **** (huh, when I previewed the post, I see it doesn't like the word . . . a n a l) in my methods. I'm an engineer, what can I say? I am also using AutoCAD as a tool for on the fly designing of my components as well as for the standard solid models and drawings I will end up with. Sometimes, knowing that 5th decimal place helps me to know if I am centered between some features of the part or something like that. I know later, I will need to come back and apply practical amounts of precision based upon the necessary tolerances and manufacturing methods selected, but I like knowing the command.

 

ReMark, it turns out that the LUPREC variable setting is one and the same as the setting you mentioned under the Dimension Style Manager. It would just be a quick way to get that extra precision I suppose if you were wanting that extra decimal place on those rare occasions.

luprec.jpg

Link to comment
Share on other sites

  • 5 weeks later...

Since reading this about the LUPREC variable, I've just been leaving it set at 8. Even though I work usually to even thousandths of an inch, I like having the string of extra zeros at the end, as I can quickly see that I am on a discreetly specified point and not at a randomly drawn or calculated point (which probably indicates I've made some error in my figuring or drawing if that turns out to be the case.

Link to comment
Share on other sites

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