<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic glob_user_2 not getting set in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/glob-user-2-not-getting-set/m-p/73378#M36838</link>
    <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;Hello,&lt;BR /&gt;
&lt;BR /&gt;
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:&lt;BR /&gt;
&lt;BR /&gt;
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.&lt;BR /&gt;
&lt;BR /&gt;
In the master script for this library part I say something like:&lt;BR /&gt;
if published then&lt;BR /&gt;
  if drawing_type_a then&lt;BR /&gt;
    glob_user_2 = 1&lt;BR /&gt;
  else&lt;BR /&gt;
    glob_user_2 = 99&lt;BR /&gt;
  endif&lt;BR /&gt;
else&lt;BR /&gt;
  glob_user_2 = 0&lt;BR /&gt;
endif&lt;BR /&gt;
&lt;BR /&gt;
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)&lt;BR /&gt;
&lt;BR /&gt;
In a different library part I say something like:&lt;BR /&gt;
&lt;BR /&gt;
if str(glob_user_2,1,0) = "0" then&lt;BR /&gt;
  text2 0,0,"NOT PUBLISHED"&lt;BR /&gt;
endif&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
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.&lt;BR /&gt;
&lt;BR /&gt;
The 'NOT PUBLISHED' text goes away after doing a manual rebuild/regen.&lt;BR /&gt;
&lt;BR /&gt;
I have checked through our entire library and am certain that nothing else is setting glob_user_2.&lt;BR /&gt;
&lt;BR /&gt;
Has anyone had similar problems when using global variables?&lt;BR /&gt;
Is this an ok use of global variables in gdl?&lt;BR /&gt;
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)&lt;BR /&gt;
&lt;BR /&gt;
Any insight would be much appreciated.&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Adam&lt;/T&gt;&lt;/DIV&gt;</description>
    <pubDate>Fri, 29 Apr 2005 02:47:08 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2005-04-29T02:47:08Z</dc:date>
    <item>
      <title>glob_user_2 not getting set</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/glob-user-2-not-getting-set/m-p/73378#M36838</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;Hello,&lt;BR /&gt;
&lt;BR /&gt;
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:&lt;BR /&gt;
&lt;BR /&gt;
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.&lt;BR /&gt;
&lt;BR /&gt;
In the master script for this library part I say something like:&lt;BR /&gt;
if published then&lt;BR /&gt;
  if drawing_type_a then&lt;BR /&gt;
    glob_user_2 = 1&lt;BR /&gt;
  else&lt;BR /&gt;
    glob_user_2 = 99&lt;BR /&gt;
  endif&lt;BR /&gt;
else&lt;BR /&gt;
  glob_user_2 = 0&lt;BR /&gt;
endif&lt;BR /&gt;
&lt;BR /&gt;
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)&lt;BR /&gt;
&lt;BR /&gt;
In a different library part I say something like:&lt;BR /&gt;
&lt;BR /&gt;
if str(glob_user_2,1,0) = "0" then&lt;BR /&gt;
  text2 0,0,"NOT PUBLISHED"&lt;BR /&gt;
endif&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
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.&lt;BR /&gt;
&lt;BR /&gt;
The 'NOT PUBLISHED' text goes away after doing a manual rebuild/regen.&lt;BR /&gt;
&lt;BR /&gt;
I have checked through our entire library and am certain that nothing else is setting glob_user_2.&lt;BR /&gt;
&lt;BR /&gt;
Has anyone had similar problems when using global variables?&lt;BR /&gt;
Is this an ok use of global variables in gdl?&lt;BR /&gt;
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)&lt;BR /&gt;
&lt;BR /&gt;
Any insight would be much appreciated.&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Adam&lt;/T&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 29 Apr 2005 02:47:08 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/glob-user-2-not-getting-set/m-p/73378#M36838</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-04-29T02:47:08Z</dc:date>
    </item>
  </channel>
</rss>

