The Global ARCHICAD Community

Stay informed. Get help. Share your knowledge.

Everything about using Libraries and Library Parts - Doors/Windows/Objects/Stairs etc. (Example: How can I display a Transom above my Door?)

Moderators: Karl Ottenstein, LaszloNagy, ejrolon, Barry Kelly, gkmethy, Gergely Feher


With ArchiCAD9.0 we used to set some user’s global variables (GLOB_USER_1 to GLOB_USER_20) from an element’s master script (we call it as DataBlock) and we use them in other elements master script. We never had any problem in elevation windows or in 3d window.

Now we are using same library in ArchiCAD12.0, the other elements loosing GLOB_USER values in elevation windows or in 3d window.

DataBlock Master Script:
if published then
if drawing_type_a then
glob_user_2 = 1
glob_user_2 = 2
glob_user_2 = 99

Other elements Master Script:
if glob_user_2 <> 99 then
Published = true
Published = false

I am getting glob_user_2 = 2 in the floor plan. But, I am getting glob_user_2 = 0 in elevation windows or in 3d window. Other than glob_user_2 all user’s globals values I am getting 0 or empty string.

Is there any problem with ArchiCAD12.0 or is there any other way I can use all my user’s globals in any window.
Hello Ranga,
Graphisoft in there wisdom have disabled the use of Glob_User values in 3D (elevation) in version 12 as they told me there were problems with it - Although I had been successfully using it for the last 5 or so years.

Here is a link to a post when i first noticed the problem. ... %2A#125398

Using the RETURNED_PARAMETERS option in the CALL statement did end up working for us once I used it properly.
But you are not calling any macros so I am not sure what your solution will be.
Except maybe writing to an external text file instead of a Glob_User variable.

This was the reply I got from David Shorter at GS AUS.

This is the latest comment from Ed Brown of Graphisoft with a partial explanation.
Basically they are saying that it didn’t work properly (and couldn’t be made to work properly)

AC 12 IN 2D GLOB_USER_... variable will pass values between object in 2d in a random way.
It is dependent on which element runs first. This functionality will be phased out, since it is considered dangerous.
In 3D GLOB_USER_... variables can NOT be used to pass values between objects, since the scope of the variable is only within the individual element.
AC 11 and earlier GLOB_USER_... variable could be used, but the order was not guaranteed

Unfortunately it seems you will need to find another way of doing what you want.
I had to change all of our door and window objects as they would not display in 3d because they couldn't get the Glob_User values.
Fortunately for me it was a fairly simple change in the script to call the value directly from the other object rather than pass it through a Glob_user.

Thank you Barry,

Is there anyone has any thoughts why global variables loosing it values in 3D script.

Is they are global variables or 2D_variables?


In ArchiCAD9 we used to set all parameters, which are used in other elements in a element (called titleblock) and then assign these values to the free global variables (GLOB_USER_1 to GLOB_USER_20) and used these free global variables in other elements and it works ok.

In ArchiCAD12 the free global variables loosing their values and Barry (privies post) told us it is intentional change. So, I created the functionality in APX such that when my mail element (titleblock) perimeters are changed I grab the values and I am setting them in all other elements.
This procedure leads us two problems.

1. It is taking 3 to 6 seconds (depending on the drawing) of time to set the values in the all other objects.
2. My function is not setting the values of the elements if they are in Hotlink Module.

We come up with another solution by using GDL Input-Output add-ons and write the values to the text file and read that text file in other elements. But, this procedure taking more than 10 seconds.

We try to use macros with RETURNED_PARAMETERS. But, we can’t use this procedure because, the values (parameter) dependent on instance of the object or macro (titleblock) not on the library values. (I mean the values are rapidly changing and dependent on that particular drawing).

Is there any procedure can I fallow to achieve my desired affect?
Are there any advances in this way in ArchiCAD13?

What about using the Project Info?
You can create as many new fields in there as you need and store a value with them.
Objects can read this info.
Change the Project Info values and all objects should update.
It is a bit like using an external text file but it is all internal.
I just played with this and it works fine if all you want to do is display the text of the Project Info in any object.
But if you actually want to read the auto-text and change your object depending on the value of the auto-text then I don't think it will work.
I can't find a way to actually read the value of the auto-text.
Maybe there is a way (ie REQUEST("") ) - but I don't see it documented anywhere.
So maybe this won't do what you want.
Ranga Rao wrote:Are there any advances in this way in ArchiCAD13?
Take a look at the new LIBRARYGLOBAL command, which allows you to create your own Model View Options that can alter library parts based on their parameters. You can see an example of this by loading the ArchiCAD 13 Library and looking at MVO > Options for GDL Objects (ArchiCAD Library 13).