cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
Collaborate forum

STRCALCUNIT Expressions changes Imperial fractions

Anonymous
Not applicable
Example 1: The expression [ STRCALCUNIT (@width) ] for a value that is 1 3/8" (length value) returns 1 1/3" (string value)
The expression [@width] for a value that is 1 3/8" (length value) returns 1 3/8" (length value)

Example 2: The expression [ STRCALCUNIT (@height) ] for a value that is 5 1/2" (length unit) returns 5 1/1" (string value)
The expression [@height] for a value that is 5 1/2" (length value) returns 5 1/2" (length value)

@=Autotext

Not sure why it doesn't simply use the returned length value and just redefine it as a string value.... I need the length value converted to a string value so that I can use it with a CONCAT expression with other strings.

Any advice would be welcome. Also, trying different settings for the "Calculation Units and Rules.." does nothing.
2 REPLIES 2

Daniel Kovacs
Graphisoft
Graphisoft
Hello DuncanG,

I have tested this, and it looks like this is because of a bug, so I added it to our to-do-list. We want to fix this in an update for ARCHICAD 22, you will find it in the Release note as fix #261234.

The function should return the value as a string in the format you set for that value type in calculation Units and Rules. Unfortunately the issue is that it is not taking Calculation Units and Rules into consideration, it uses a kind of random precision when used with Imperial units (with fractions). Metric units and decimal feet/inches work fine.

Unfortunately the only workaround I could find is using decimal feet/inches instead of fractional feet & inches. I think even though it looks weird, it might be enough to get by with until the fix, but if you find a better solution, please let me know!

Regards,
Daniel Alexander Kovacs

Professional Services Consultant

GRAPHISOFT



For Troubleshooting and useful Tips & Tricks visit

Anonymous
Not applicable
OK!
23 fixes the fraction error and no longer changes 7 7/8" to 7 1/1".
I would like to fix the output so I don't get
0'-4" for 4"
and 3' for 3'-0"
I can do that with a convoluted expression that includes @conc and @strcalcunit
How do I get an inch character (") in a @conc string?

Start a new conversation!

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!