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

story global variables

Anonymous
Not applicable
I can't seem to get these variables to report values reliably - any tips?

For example, no matter what I do, S~, or GLOB_CH_STORY_DIST always reports a value of 0, no matter what story I'm on or what story the object is on.

I'm developing an object, using these in the 2D script window, and examining values (or trying to) using the PRINT function to report values.

What am I missing?
6 REPLIES 6
Anonymous
Not applicable
Well OK - the part works beautifully, but never could get the variable to report the value it obviously is taking... since the script works.

So if anyone can explain the mechanism just to satisfy curiosity we'll call it a day.

(BTW - the object is a pipe column with parametric baseplate for bolting - where the baseplate is not shown above the home story - simple, really.)

Enjoy the weekend.
The story and other err environment-related variables have 'instance-specific' values that you will not be able to access as you script the soul of your object in Limbo. Once the object is placed, your script will read the value for each of the individual instances and respond individually to each of them. Like when you say 'divide age by 2 and add 7 to get the optimal age for a girlfriend', you still need the individual guy for the formula to give you the girl value.
Anonymous
Not applicable
I surmised as much. But even when asking a placed object to report variable values via the PRINT function I still received incorrect (i.e. zero) for the value of S~ even when clearly it shouldn't have been.

Go figure. Thanks.
Anonymous
Not applicable
i am not sure some one may need to confirm this but i think there is a global variable GLOB_HSTORY_INDEX that returns the story number that the object is placed on as displayed in the story settings

S~ is always 0 in relation to the story that the object is place on i have used it if i wish to control the appearence of ojects over different stories

for example a timber beam you may wish to show as a rectangle on the
inserted storey but on the storey below you may want to show as a dashed line
Anonymous
Not applicable
have to correct myself if you wish to display the storey an object is placed on use

rrr= REQUEST ("Story", "", index, story_name)

text2 0,0, index
Anonymous
Not applicable
Global GDL Parameters
GLOB_CH_STORY_DIST
Old name: S~
Type: numerical (integer value)
Possible range: positive or negative or zero.
Returns a number giving the relative position of the current story to the home story of the Library Part. The value of the variable is calculated by deducting the story number of the home story from the story number of the current story. Since there is no story-related information in the 3D Window, there the variable does not return a valid value.
I used this global parameter in only one element - the ventilation hole. This helped me to make different 2D drawing on different stories. See screenshot.
To use this feature you want to include the option "Show on All stories."

Sample 2D-script:
IF GLOB_CH_STORY_DIST < 0 OR GLOB_CH_STORY_DIST > nShowStory THEN END
IF GLOB_CH_STORY_DIST = 0 THEN
   !!!A description of part symbol, which is present only in the home story of element.
ENDIF
   !!!A description of part symbol, which is present in all authorized stories.
END
nShowStory - integer value. It specify the number of stories on which element will be shown.