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

glob_user_2 not getting set

Anonymous
Not applicable
Hello,

I have an annoying problem where sometimes the glob_user variables are not getting set. Any help would be appreciated. The scenario is as follows:

I have a library part which exists on all our plans. It contains a parameter which states whether the drawing has been published or not. By published I mean approved - internal lingo.

In the master script for this library part I say something like:
if published then
if drawing_type_a then
glob_user_2 = 1
else
glob_user_2 = 99
endif
else
glob_user_2 = 0
endif

Several library parts show error messages when glob_user_2 is set to 0, this forces the users to publish the drawing (the published parameter gets set when management publishes this drawing. it is locked for all other users)

In a different library part I say something like:

if str(glob_user_2,1,0) = "0" then
text2 0,0,"NOT PUBLISHED"
endif


I have a drawing that is published. On opening a drawing our apx does a programmatic rebuild and regen, but one of my library parts that does this check still has the error. This has happened before, most times everything works fine.

The 'NOT PUBLISHED' text goes away after doing a manual rebuild/regen.

I have checked through our entire library and am certain that nothing else is setting glob_user_2.

Has anyone had similar problems when using global variables?
Is this an ok use of global variables in gdl?
We are using ArchiCAD 7, does anyone know if a problem like this was fixed in ArchiCAD 9? (we are in the process of upgrading)

Any insight would be much appreciated.

Thanks,
Adam
0 REPLIES 0

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!