cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
Developer forum

AC_StoryNumber as integer

Bruce
Booster

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
http://www.brucepwalker.com
https://www.mindmeister.com/65450406
-- since v8.1 --
AC24 6004 INT Full | Windows 10 64 Pro | 2.8 GHz Intel i7-7700HQ | 32 Gb RAM | NVIDIA GeForce GTX 1060 6 Gb
3 REPLIES 3

DGSketcher
Rockstar

@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 macOS Monterey / AC26UKI (most recent builds)

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

Bruce
Booster

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
http://www.brucepwalker.com
https://www.mindmeister.com/65450406
-- since v8.1 --
AC24 6004 INT Full | Windows 10 64 Pro | 2.8 GHz Intel i7-7700HQ | 32 Gb RAM | NVIDIA GeForce GTX 1060 6 Gb

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!