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

Parameters for Listing

Dave Seabury
Advocate
Is there any way to schedule roof pitch? I have a parameter 'pitch' where you enter the value for 'x'...........x/12. I am trying to schedule the value x/12.

pitch = 8
PARAMETERS pitch_for_listing = pitch/12 ....results in .667
PARAMETERS pitch_for_listing = '/12' .........results in /12

Is there any way to get the value of 'pitch' in front of /12? 8/12

Thanks in Advance

David
AC 19-26 Windows 10 64 bit, Dell Prercision 7820, Xeon Silver 2414R ( 12 Cores), 64 GB Ram, Quadro RTX 4000 8GB
5 REPLIES 5
David Maudlin
Rockstar
Dave:

You need to combine the numerical value with the text, so your code should be something like:
PARAMETERS pitch_for_listing = pitch + "/12"

David
David Maudlin / Architect
www.davidmaudlin.com
Digital Architecture
AC27 USA • iMac 27" 4.0GHz Quad-core i7 OSX11 | 24 gb ram • MacBook Pro M3 Pro | 36 gb ram OSX14
Dave Seabury
Advocate
Thanks David

I'll give it a try.

David
AC 19-26 Windows 10 64 bit, Dell Prercision 7820, Xeon Silver 2414R ( 12 Cores), 64 GB Ram, Quadro RTX 4000 8GB
Dave Seabury
Advocate
David

I'm getting a "incompatible type expressions" error. The value for the pitch has to be a dimension or a real number and the pitch_for_listing is a text value, so i think this is where the error is coming from. I tried looking through the GDL help file to see if i could convert the pitch value to text but didn't come up with anything. Do you know if this can be done?

Thanks for your input

David
AC 19-26 Windows 10 64 bit, Dell Prercision 7820, Xeon Silver 2414R ( 12 Cores), 64 GB Ram, Quadro RTX 4000 8GB
Anonymous
Not applicable
Hello,

Make the pitch_for_listing as a string type parameter.
Then you could use for example;

pitch_for_listing= str(pitch,1,0) + '/12'
parameters pitch_for_listing= pitch_for_listing

Hope this works / helps.

Rehards, Juha
Dave Seabury
Advocate
Juha,

That worked.........Many thanks

David
AC 19-26 Windows 10 64 bit, Dell Prercision 7820, Xeon Silver 2414R ( 12 Cores), 64 GB Ram, Quadro RTX 4000 8GB