AutoCAD 2000/2000i/2002 Archive (Read Only)
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Convert decimal feet to Fractions

6 REPLIES 6
Reply
Message 1 of 7
Anonymous
813 Views, 6 Replies

Convert decimal feet to Fractions

Hey,

I have several numbers in decimal, for ex. 31.23 feet. I want to
automatically convert the numbers to fractional feet, inches and 1/4
inches (31' 2 3/4").

I can convert and DDEDIT them myself, but I want the machine to do it.
Does anyone know a method? Prefferably within Acad2002, but I have Excel
at my disposal as well. Maybe some way with dimension styles???

Thanks!
David
6 REPLIES 6
Message 2 of 7
Anonymous
in reply to: Anonymous

Am I missing something, or is this what DDUNITS is for? Or
DDIM>Annotation>Primary Units>Units>Engineering is the format I think you
want.
Message 3 of 7
Anonymous
in reply to: Anonymous

Oh I forgot. While in Units set your Precision to the appropriate level.
Message 4 of 7
Anonymous
in reply to: Anonymous

Well, my numbers are text objects only (in Autocad). So setting units
doesn't do a thing for me, it's still just a hunk of text. I thought
maybe I could do it by getting the text in as the dimension value
somehow, but I couldn't figure out how to do it short of offsetting a
line for each number, dimensioning the offsetted lines, exploding the
dimensions to get at the text, moving and aligning, what a pain. Excel
came close to doing what I wanted, but 31.23' would convert to 31 1/4",
not 31' 2-3/4". Rats. I ended up doing it all by hand in the end. But
I'm still interested in an auto method if someone can think of one ...

D
Message 5 of 7
Anonymous
in reply to: Anonymous

A little LISP would go a long way, here. That's precisely what the (atof)
and (rtos) functions are designed for.

(rtos (atof "31.23") 5 4)
returns 31 1/4 ...

(rtos (* 12 (atof "31.23")) 4 4)
returns 31'-2 3/4"

...but it would have to be embedded in sufficient code to extract the
numeric string from the rest of your text. If you're not fluent in LISP,
you'll find considerable help with this process in the Customization group.
___

"David Renaud" wrote in message
news:3C92272D.55513B29@reiengineering.com...
> Well, my numbers are text objects only (in Autocad). So setting units
> doesn't do a thing for me, it's still just a hunk of text. I thought
> maybe I could do it by getting the text in as the dimension value
> somehow, but I couldn't figure out how to do it short of offsetting a
> line for each number, dimensioning the offsetted lines, exploding the
> dimensions to get at the text, moving and aligning, what a pain. Excel
> came close to doing what I wanted, but 31.23' would convert to 31 1/4",
> not 31' 2-3/4". Rats. I ended up doing it all by hand in the end. But
> I'm still interested in an auto method if someone can think of one ...
>
> D
Message 6 of 7
Anonymous
in reply to: Anonymous

hey thanks, Paul,

As it turns out the text bits are -just- the number, so I think it will
work, I will try.

I am just fluent enough in lisp to be able to open a file and -sort of-
tell what is going on. I will head to customization if I can't get this
to go.

Thanks again,
David
Message 7 of 7
Anonymous
in reply to: Anonymous

You're welcome. Glad to help.
___

"David Renaud" wrote in message
news:3C9234DC.F99B9A8C@reiengineering.com...
> hey thanks, Paul,
>
> As it turns out the text bits are -just- the number, so I think it will
> work, I will try.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report