We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2023-01-20 07:14 AM
Hi,
Thermal_conductivity = 0
Density = 0
Heat_capacity = 0
Embodied_energy = 0
Embodied_carbon = 0
s = REQUEST{2} ("Building_Material_info", 1, 'gs_bmat_physical_properties', Thermal_conductivity,Density,Heat_capacity,Embodied_energy,Embodied_carbon)
param_Thermal_conductivity = Thermal_conductivity
parameters param_Thermal_conductivity = param_Thermal_conductivity
I would like to save result (Thermal_conductivity) of request command into parameter (param_Thermal_conductivity) but it sends zero. However Thermal_conductivity has a value that can be displayed ie in text2.
Is it possible to do so?
2023-01-20 07:39 AM
Yes. I am assuming that your code is in the Parameter Script? I have used the below in one object
Master
n2 = REQUEST ("Profile_default_boundingbox", myProfileIdx, _xMin, _yMin, _xMax, _yMax)
Parameter
PARAMETERS ProWidth = abs(_xMax - _xMin)
AC22-23 AUS 7000 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win10 | R5 2600 | 16GB | GTX1660 |
2023-01-20 08:22 AM
I replicated Your examplle but its not working (AC26) although text2 (on a right) is showing retrieved value. Can You attach Your object?
2023-01-20 09:57 AM
Thanks For example.
I analised it and figureout that Your object doesnt pass value to parameter neither 😞
What You showed in previuos post was value displayed in UI. and in UI script you use again request command just to displlay value in UI. but when You look into parameters ProWidth parameter (keep this example) is 0
It pass a value only when profile is square/circle and desnt require request command
(I exposed ProWidth parameter that was named 'Width')
but when compllex profile is used it passes 0
2023-01-20 10:24 AM
Oh... I never noticed as I used the requested values to get a consistant profile position, display the values in the UI then forgot about it. Bit odd that it does not seem to work as using the requested values seems to works fine in every other situation...
Expression returns 0 and contains dummy return values (emtpy string or 0) if used in parameter script, causing additional warning.
Both our requests have that note under them... wonder what the issue is...
Ling.
AC22-23 AUS 7000 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win10 | R5 2600 | 16GB | GTX1660 |
2023-01-20 12:30 PM - edited 2023-01-20 12:30 PM
I have been wrestling with these issues recently. GDL appears to be quite selective about allowing parameters to update, I assume fairly, that this is to avoid creation of circular value settings e.g. a parameter in object A is referenced in object B and object B references object A. It may be that a REQUEST value is also considered Global and therefore there should be no need to display it as a Parameter. So all objects have to REQUEST the value from source.
If you need to see the values in the REQUEST then PRINT and TEXT2 can be useful temporary checks.