Wishes
Post your wishes about Graphisoft products: Archicad, BIMx, BIMcloud, and DDScad.

Expression result number formatting

JeffB
Contributor

Well after many years - finally - with expression properties and zones, a quick cost estimator for a schematic plan! YAY.

 

But my Total Cost column in the schedule is not formatted with thousands separators.

 

So without really thinking it through, I edited the Total Cost property by turning the number into a string, then parsed it with text functions to add a comma every third character.

 

Added that to my interactive schedule and… OH NO… the schedule won’t list a string property—not sure why but not surprised given how sensitive Expression Properties are to syntax. 🙂

And besides, a schedule can’t give me a sum for a series of strings (of course).

Can’t convert the property back to a number to get a sum ‘cause that would undo all the careful string concatenations!

 

So at the end of the day here's the feature request… all numbers, regardless, should report back with thousands separators hard-coded.

 

A small thing, yeah, could export to Excel and get it done. But we're so close at this point....

 

image.png

5 REPLIES 5
Barry Kelly
Moderator

I am not sure about this, but is it the Working Units?

Calculation Units control lengths, heights, widths in the schedule, but as you are using expressions, these oddly are not classified as calculation units.

In Working Units there is an option for 'Numbers without units' which might include expression results.

But as I say I am not sure, but might be worth a try.

Of course the expression will have to be a number and not converted to a string.

 

BarryKelly_0-1649391113662.png

 

Barry.

 

 

One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

AFAIK - expressions return values in calculation units. Within a expression, you can use any units you like and it will make the conversion(s). I believe the number unit selection will not add comma separators unlike the length, etc. measurements.

 

The problem is that Archicad currently has no currency format available. The work around (and not a good one) is to use a Python script to do the calculation and write a formatted currency string to a user property assigned to the element(s). The expression is not used but a Python script requires a manual update. That may be unacceptable but still would be easier than using Excel

Gerry

Windows 11 - Visual Studio 2022; ArchiCAD 27

And I wasn't really thinking.

This is for decimal precision, not 1000's delimiter.

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

Gerry - Python perhaps easier than Excel.... unless you don't know the first thing about Python 😂

 

Barry - yes - Working Units will control decimal precision of those "unitless" numbers. So the software hook seems to be there. But does anyone *ever* need SF calculated to four decimal places? Silly. I'd rather have the "precision" in reports to distinguish currency from area, for example. With different decimal precision for different units...

 

But we need less of a sledgehammer and more of a scalpel. Better to have format control either within the expression itself, or at the level of a column in the schedule. Blanket settings for "all numbers, everywhere" ain't that helpful. 

 

JeffB_0-1649422176420.png

 

Thanks to both of you for your replies!

 

JeffH
Enthusiast

I am at the same juncture, but with trying to creating a label that reads the zone SF, but would prefer to have the comma included, after using an expression to round the sq ft number to the nearest whole number.

AC24 / AC26
Win10