Documentation
About Archicad's documenting tools, views, model filtering, layouts, publishing, etc.

Convert Option Set Parameter to Number in Expressions

JCCARLOS91
Enthusiast

Hi,

 

Quick one, I think. How do I use a number from an option set parameter as a divisor to an equation?

 

For example, I'm trying to get the measured area (from zone) divided by total BUA (option set parameter) and multiply that by 100 to get the percentage.

 

I hope my query is clear.

 

Thank you!

John Carlos
AC25 | iMac 2019
3 REPLIES 3
Barry Kelly
Moderator

I am not sure if you can directly.

Although you can type a number in an option set, I think it is treated as a string.

So you may need to convert this in a expression using STRTONUM ( "Text" )

 

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

Hi Barry,

 

I was able to reach out to a friend who assisted me in this. This the expression that we formulated to get the calculation I wanted.

 

Measured Area / ( ( ( STRONUM ( VILLA BUA ) * 1 m2 ) ) + ( ( STRTONUM ( TERRACE BUA ) * 1 m2 ) ) ) * 100

 

  • Measured Area -  automated area from the zones
  • VILLA BUA - Option Set Parameter translated to a number using "Number form String" Conversion
  • TERRACE BUA - Option Set Parameter translated to a number using "Number form String" Conversion
  • 1 m2 - To be taken form the units selection (ruler icon) to convert the Option Set Parameter into a measurable area. Specific note to click the m2 from the units selections and not to be typed in manually. Though 1 was typed in manually.
  • Remove the default " "

 

Hope this would help others too.

 

Regards,

John Carlos

John Carlos
AC25 | iMac 2019

The moral of this story is that you can do anything in Archicad if you know how

BUT

its far too complicated !!!!

Archicad 4.1 to 27 Apple Silicon
you can't build a line
Mac Studio
iPad Pro
iPhone