Jump to content

ATOF Gives 14 decimal places


Bill Tillman

Recommended Posts

I have a simple question here. One that should be resolved easily with searching but again LISP documentation is like Murphy's Law with me. As soon as I need to research something all articles on that topic are immediately removed from all available documents....at least one would think so.

 

Drawing File A has units set to Fractional with Precision to 1/32". My LISP code reads in variable "b" from a file. The value of "b" is 28. When I print "b" it comes up as "28". When I need to do a calc with "b" ( - (atof b) 0.5) it comes up with 27.5 at the command line. But when the LISP program runs it comes up with 27.50000000000000. So what am I missing on this. I don't want a fixed number because I eventually need this to show up as fractional (27 1/2").

Link to comment
Share on other sites

Lee,

 

Thanks again dude. Sometimes it's hard to see the forest for the trees. I have been reading the *Book* and by that I meant the on-line AutoLisp Resource Guide and the Developers Guide. The trouble with these are that the subjects I want to cover which are in these docs suddenly go into the VBA side of it. And I don't have VBA running here, not yet anyway. And my learning curve for VLISP is bad enough...

 

I have some more detailed questions which will require me to show some of the details I'm working with. But due to non-disclosure agreements I will have to make up some new details totally unrelated to this work but still in line with what I'm trying to make happen here in order to show what I mean by all this chaos.

 

The dimension text override was tabled because I just threw the 800 lbs gorilla at it and exploded the dimensions and used your M-Text module to insert some new text. This is when I realized the dimension text override would not be such a good idea afterall. We're shooting for total automation here. People with little to no CAD experience will be using this when I'm finished. And it dawned on me that using text override would mean the program would have to know when it was working with integers and floating point, fractions would have to be formatted properly in the override field for stacking, etc.... so the process I came up with today is actually better.

 

Oh yes, if it's any consulation...I've really been learning alot about the DXF references and how to use them. It's working very well but I'm still very green at this. I do appreciate everyone's patience and replies to my questions.

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