cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
2024 Technology Preview Program

2024 Technology Preview Program:
Master powerful new features and shape the latest BIM-enabled innovations

Collaboration with other software
About model and data exchange with 3rd party solutions: Revit, Solibri, dRofus, Bluebeam, structural analysis solutions, and IFC, BCF and DXF/DWG-based exchange, etc.

Formulas in Schedules

Anonymous
Not applicable
Is there a way to put a formula in a a cell of a schedule? I need to use in a zone schedule a field calculating one fifth of the area of the windows surface and showing it. Any help?
16 REPLIES 16
TomWaltz
Participant
it would be nice, but no
Tom Waltz
Rob
Graphisoft
Graphisoft
It is an essential wish, but in the meantime such calculations can be done in a customized zone stamp.
! parameter: winAreaFifth (real number type)

! In master script
winAreaFifth=ROOM_WINDS_SURF*0.2
PARAMETERS winAreaFifth= winAreaFifth
Then add that parameter to the schedule using Scheme Settings -> Fields -> Additional Parameters.
James Murray

Archicad 27 • Rill Architects • macOS • OnLand.info
Anonymous
Not applicable
That's a great tip! but the value I want would be the fifth of Room_area instead of room_winds_surf. By the way, the room_winds_surf ignores windows smaller than 1 square meter. Where do I set this value?
Anonymous
Not applicable
Ok , I tried a lot but it didn't work. I created a zone stamp introducing two parameters: One sets the factor of the calculation and one that calculates it. Everything works fine, but when I insert this parameter on a schedule it remains blank (appearing dashed lines instead) whenever I reopen the file. Here is the parameter calculation:
! options for the factor calculation
values "Vent_ilum_factor_name" "1/8","1/5"
if Vent_ilum_factor_name="1/8" then Ilum_vent_factor=0.125
if Vent_ilum_factor_name="1/5" then Ilum_vent_factor=0.2

! calculating the needed illumination and ventilation area
Ilum_vent_ar= ROOM_CALC_AREA*Ilum_vent_factor
PARAMETERS Ilum_vent_area=Ilum_vent_ar

! Showing the existent illumination and ventilation area
Ilum_vent_exist= ROOM_WINDS_SURF
PARAMETERS Ilum_vent_exist= Ilum_vent_exist
What am I doing wrong?
I think there is no way of showing a value calculated by a script in the schedule, because the scripts are not run by the schedule. The zone stamp script calculates the thing for display in the 2D window but will do nothing about the schedule.
1. Did you create the parameters "Ilum_vent_area" and "Ilum_vent_exist"? Dashed lines in a schedule usually means the parameter is not available in the object (stamp).

2. Is the code in the Master Script?

To be clear, you certainly can schedule parameters calculated in this way. My zone stamp has a custom parameter for the area in whole square feet, and it updates when the zone shape changes. (Just checked it, whew!) The math and PARAMETERS statement are in the master script.

PARAMETERS can be used in the master or parameter scripts. Master is more robust in many cases. I believe the parameter script only runs in the settings dialog or when the object is otherwise edited, while the master will run when any script is run, which apparently includes building the schedule, thank goodness.
James Murray

Archicad 27 • Rill Architects • macOS • OnLand.info
vfrontiers
Enthusiast
As James eluded to; you must create a PARAMETER in the Parameter List that corresponds to the ones you are defining in the script. (add PARAMETER and name it the same and make it the appropriate type)

Also, why are your PARAMETER definition using two steps?

! calculating the needed illumination and ventilation area
Ilum_vent_ar= ROOM_CALC_AREA*Ilum_vent_factor
PARAMETERS Ilum_vent_area=Ilum_vent_ar

! Showing the existent illumination and ventilation area
Ilum_vent_exist= ROOM_WINDS_SURF
PARAMETERS Ilum_vent_exist= Ilum_vent_exist


Why couldn't you just type....

PARAMETERS Ilum_vent_area = ROOM_CALC_AREA*Ilum_vent_factor
Duane

Visual Frontiers

AC25 :|: AC26 :|: AC27
:|: Enscape3.4:|:TwinMotion

DellXPS 4.7ghz i7:|: 8gb GPU 1070ti / Alienware M18 Laptop
vfrontiers wrote:
Why couldn't you just type....

PARAMETERS Ilum_vent_area = ROOM_CALC_AREA*Ilum_vent_factor
There are cases where it's more reliable to do the calculation separately, such as if the value will be used in other calculations besides the PARAMETERS statement. For some reason, changing the value of the parameter does not always change the value of the variable.

However, in this case of a simple PARAMETERS assignment, you can condense it to one line.
James Murray

Archicad 27 • Rill Architects • macOS • OnLand.info