Document & Visualize forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Converting Feet and Fractional Inches to Inches

zoli79
Participant

In our projects Length Calculation Unit is set to Feet + Fractional Inches. For other reasons it is not an option for us to set it to anything else (e.g. decimal feet, decimal inches).
For a schedule I need to convert some values to Inches. Easy task, right? Ha!

The main problem is that STRCALCUNIT is unreliable when it comes to anything other than decimal units. The biggest problem is that it only recognizes the feet part of the unit, so 3'-6" becomes 3.00.

This is the workaround I came up with. It seems to work with values lesser than 1', values with fractional inches (e.g. 3'-6 7/8"). Unfortunately it seems to round the fractional inches to full values right at the beginning. That could be a problem, but not a problem now, so I didn't come up with a solution for that.

I wonder if anyone else has a better solution.

 

STRTONUM ( STRCALCUNIT ( {Property:General Parameters/Height} ) ) * 12 + IF ( ( LEN ( SPLITRIGHT ( SUBSTITUTE ( STRCALCUNIT ( {Property:General Parameters/Height} ); "-"; ""; 1 ); "'"; 2 ) ) < 2 ); 0; STRTONUM ( SPLITRIGHT ( SUBSTITUTE ( STRCALCUNIT ( {Property:General Parameters/Height} ); "-"; ""; 1 ); "'"; 2 ) ) )

 

Of course it would be best if Graphisoft solved this issue, because STRCALCUNIT is supposed to convert units to numbers, and apparently it doesn't always. Probably it would be best if they came up with converting expressions tailored to different units, instead of one expression for units that are very different in nature.

macOS Catalina, ArchiCAD 23 - USA version
0 REPLIES 0

Start a new conversation!

Labels

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!