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

GDL
About building parametric objects with GDL.

AC_StoryNumber as integer

Bruce
Advisor

I don't know why, but the parameter AC_StoryNumber is a TEXT type, even though the story number will always be an integer.  This makes it unreliable to test in GDL whether the current story falls inside / outside a selected range, particularly when testing for negative stories (e.g. IF AC_StoryNumber >= -2 AND AC_StoryNumber <= 6 THEN).

 

Is there any way to query the current story (in a Story Marker, in this instance) to return an integer?

Bruce Walker
Barking Dog BIM YouTube
Mindmeister Mindmap
-- since v8.1 --
AC27 5060 INT Full | Windows 11 64 Pro | 12th Gen Intel i7-12700H 2.30 GHz | 64 Gb RAM | NVIDIA GeForce RTX 3060 32 Gb
3 REPLIES 3
DGSketcher
Legend

@Bruce You could try using the SPLIT function to extract the Integer value. Have you looked at using Request with "STORY_INFO" to deliver comparison values?

Apple iMac Intel i9 / macOS Sonoma / AC27UKI (most recent builds.. if they work)

I used the elevator object to learn how to get all the story info. 

Bruce
Advisor

Thanks for this - unfortunately it doesn't solve the fundamental problem of Archicad returning a text parameter for the current story in the Story Marker.

 

The way I solved it was to create a separate array filled with the story numbers as integers, then run a loop to match the current story (it will find an equal to with a string, but not a less-than / greater-than) with the array value.  Then I declare a variable with that integer.

Bruce Walker
Barking Dog BIM YouTube
Mindmeister Mindmap
-- since v8.1 --
AC27 5060 INT Full | Windows 11 64 Pro | 12th Gen Intel i7-12700H 2.30 GHz | 64 Gb RAM | NVIDIA GeForce RTX 3060 32 Gb

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!