We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

trying to get zone to list area sf multplied by a parameter

Anonymous
Not applicable
I'm starting out with a zone tag that will put in the area surrounded by a box and the following is part of the code

if area then
n=n+1
vlen =vlen + shight
Text2 middle, -vlen, room_area
endif

I thought I'd just add some more code where xx_rsf = room_area* parameter. The problem is I cant multiply room_area by a parameter! How do I accomplish this


if show_rsf then
n=n+1
vlen =vlen + shight
Text2 middle, -vlen, xx_rsf


Thanks,
michele
5 REPLIES 5
Aussie John
Newcomer
You can use the somewhat confusing STR command to "convert" the erroneous string into one that will allow multiplying.
Cheers John
John Hyland : ARINA : www.arina.biz
User ver 4 to 12 - Jumped to v22 - so many options and settings!!!
OSX 10.15.6 [Catalina] : Archicad 22 : 15" MacBook Pro 2019
[/size]
Anonymous
Not applicable
John,

I think you mean the SPLIT command. That's what will extract numbers from strings. STR makes formated strings from numbers.
Frank Beister
Moderator
There must be another problem in your script. ROOM_AREAin zone stamps is numeric type (real) and can be multiplicated with other numeric values and variables/parameters.
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm
Anonymous
Not applicable
rsf_123=(room_area)*rsfmul
rsf_123 = rsf_123 + area_unit

and then further down the code:

if area then
n=n+1
vlen =vlen + shight
Text2 middle, -vlen, room_area
endif


if show_rsf then
n=n+1
vlen =vlen + shight
Text2 middle, -vlen, rsf_123

I don't get an error now that I put parenthesis around room_area before I multiplied it to the parameter rsfmul ... but my numbers are all wrong. For a 50 ft sf area the rsf_123 that is being displayed in the zone tag in 2D is 5.34192 without the sf after it. And the rsfmul parameter = 1.15. So I want the zone tag to get the sf from the zone tag then look at the parameter rsfmul and multiply it by it then display that number with SF after it in the zone tag in plan.

Such a simple task yet so tricky

Thanks for all your help,
Michele
Frank Beister
Moderator
Have a look at the STR-command. You have to use the version with formatting string. It allows to output other than metric values.
Internal AC works metric only. Even if you insert a ft-value (depending of your general project settings) in an infield the parameter will immediately change it to metric.
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm