<?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 Re: how to know if the script is being run in library editor in GDL</title>
    <link>https://community.graphisoft.com/t5/GDL/how-to-know-if-the-script-is-being-run-in-library-editor/m-p/398298#M5624</link>
    <description>&lt;P&gt;Thanks @runexel, sorry for the delayed response, nice workaround for managing placement, will use this for other instances. In my case I want to be able to initiate some code when in the library editor but turn off for the user, be it placed or not.&lt;/P&gt;</description>
    <pubDate>Fri, 15 Sep 2023 01:07:17 GMT</pubDate>
    <dc:creator>easyDoesIt</dc:creator>
    <dc:date>2023-09-15T01:07:17Z</dc:date>
    <item>
      <title>how to know if the script is being run in library editor</title>
      <link>https://community.graphisoft.com/t5/GDL/how-to-know-if-the-script-is-being-run-in-library-editor/m-p/392804#M1175</link>
      <description>&lt;P&gt;I have a label that I have setup to only run associated to a door. When not a door, it ends quite quickly with a warning message. This it turn creates a problem in the library editor because it is not yet associated with a door. I can have a variable that I turn on temporarily while coding but wonder if there is a global variable or request I can use to see if the script is run in the library editor and therefore automate it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;GLOB_ELEM_TYPE can't be used because it is 0 both when not placed AND when as an independent label.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2023 07:43:19 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/how-to-know-if-the-script-is-being-run-in-library-editor/m-p/392804#M1175</guid>
      <dc:creator>easyDoesIt</dc:creator>
      <dc:date>2023-07-20T07:43:19Z</dc:date>
    </item>
    <item>
      <title>Re: how to know if the script is being run in library editor</title>
      <link>https://community.graphisoft.com/t5/GDL/how-to-know-if-the-script-is-being-run-in-library-editor/m-p/392805#M1176</link>
      <description>&lt;P&gt;I haven't used, but possible it works:&lt;/P&gt;
&lt;DIV class="page" title="Page 374"&gt;
&lt;DIV class="layoutArea"&gt;
&lt;DIV class="column"&gt;
&lt;P&gt;&lt;SPAN&gt;GLOB_DIAGNOSTICS_MODE&lt;/SPAN&gt; together with Developer Menu.&lt;BR /&gt;or GLOB_CONTEXT = 1 (but it is depracted and only works in 2D, 3D and UI) &lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 20 Jul 2023 07:52:30 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/how-to-know-if-the-script-is-being-run-in-library-editor/m-p/392805#M1176</guid>
      <dc:creator>Jochen Suehlo</dc:creator>
      <dc:date>2023-07-20T07:52:30Z</dc:date>
    </item>
    <item>
      <title>Re: how to know if the script is being run in library editor</title>
      <link>https://community.graphisoft.com/t5/GDL/how-to-know-if-the-script-is-being-run-in-library-editor/m-p/392828#M1177</link>
      <description>&lt;P&gt;Thanks Joachim,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used to use glob_context back in the day but worry it is deprecated now so might be unstable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was looking into glob_diagnostic_mode with the developer menu but couldn't work it out. Will look into it further.&lt;/P&gt;</description>
      <pubDate>Sat, 22 Jul 2023 05:53:21 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/how-to-know-if-the-script-is-being-run-in-library-editor/m-p/392828#M1177</guid>
      <dc:creator>easyDoesIt</dc:creator>
      <dc:date>2023-07-22T05:53:21Z</dc:date>
    </item>
    <item>
      <title>Re: how to know if the script is being run in library editor</title>
      <link>https://community.graphisoft.com/t5/GDL/how-to-know-if-the-script-is-being-run-in-library-editor/m-p/392902#M1178</link>
      <description>&lt;P&gt;Got the &lt;SPAN&gt;GLOB_DIAGNOSTICS_MODE&lt;/SPAN&gt; working. But only works outside of library editor.....&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2023 23:05:34 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/how-to-know-if-the-script-is-being-run-in-library-editor/m-p/392902#M1178</guid>
      <dc:creator>easyDoesIt</dc:creator>
      <dc:date>2023-07-20T23:05:34Z</dc:date>
    </item>
    <item>
      <title>Re: how to know if the script is being run in library editor</title>
      <link>https://community.graphisoft.com/t5/GDL/how-to-know-if-the-script-is-being-run-in-library-editor/m-p/393690#M1179</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Archicad Library uses this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;bDefaultElem		= (GLOB_INTGUID = "" | GLOB_INTGUID = "{00000000-0000-0000-0000-000000000000}")
_isEnabledContent	= (bDefaultElem | GLOB_ELEM_TYPE = ...)

if not(_isEnabledContent) then
    ... ! show message on plan / UI
    end
endif&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jul 2023 09:50:09 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/how-to-know-if-the-script-is-being-run-in-library-editor/m-p/393690#M1179</guid>
      <dc:creator>Peter Baksa</dc:creator>
      <dc:date>2023-07-28T09:50:09Z</dc:date>
    </item>
    <item>
      <title>Re: how to know if the script is being run in library editor</title>
      <link>https://community.graphisoft.com/t5/GDL/how-to-know-if-the-script-is-being-run-in-library-editor/m-p/394255#M1180</link>
      <description>&lt;P&gt;Thanks Peter, this works in the library editor. But it also turns on the default element type when the user has not yet placed the label as a GUID has not yet been assigned. Ideally I want it to trigger in the library editor only.&amp;nbsp;&lt;SPAN&gt;GLOB_DIAGNOSTICS_MODE seems like the best method if it worked in the library editor also. Would be good if this made it into an update.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Aug 2023 06:01:24 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/how-to-know-if-the-script-is-being-run-in-library-editor/m-p/394255#M1180</guid>
      <dc:creator>easyDoesIt</dc:creator>
      <dc:date>2023-08-04T06:01:24Z</dc:date>
    </item>
    <item>
      <title>Re: how to know if the script is being run in library editor</title>
      <link>https://community.graphisoft.com/t5/GDL/how-to-know-if-the-script-is-being-run-in-library-editor/m-p/394303#M1181</link>
      <description>&lt;P&gt;There is a very stupid workaround:&lt;/P&gt;
&lt;P&gt;Make a new parameter called &lt;CODE&gt;AC_ProgramVersion&lt;/CODE&gt; (type being "integer").&lt;/P&gt;
&lt;P&gt;As soon as the object is placed a number (e.g. 26) will be assigned, so you can just test if that param is zero.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Aug 2023 13:09:33 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/how-to-know-if-the-script-is-being-run-in-library-editor/m-p/394303#M1181</guid>
      <dc:creator>runxel</dc:creator>
      <dc:date>2023-08-04T13:09:33Z</dc:date>
    </item>
    <item>
      <title>Re: how to know if the script is being run in library editor</title>
      <link>https://community.graphisoft.com/t5/GDL/how-to-know-if-the-script-is-being-run-in-library-editor/m-p/395169#M1182</link>
      <description>&lt;P&gt;Try GLOB_PREVIEW_MODE, it is 1 in the settings dialog, and 0 in GDL editor. I am not sure it works according to your needs with the infobox and favorites.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Aug 2023 07:20:20 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/how-to-know-if-the-script-is-being-run-in-library-editor/m-p/395169#M1182</guid>
      <dc:creator>Peter Baksa</dc:creator>
      <dc:date>2023-08-17T07:20:20Z</dc:date>
    </item>
    <item>
      <title>Re: how to know if the script is being run in library editor</title>
      <link>https://community.graphisoft.com/t5/GDL/how-to-know-if-the-script-is-being-run-in-library-editor/m-p/398298#M5624</link>
      <description>&lt;P&gt;Thanks @runexel, sorry for the delayed response, nice workaround for managing placement, will use this for other instances. In my case I want to be able to initiate some code when in the library editor but turn off for the user, be it placed or not.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Sep 2023 01:07:17 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/how-to-know-if-the-script-is-being-run-in-library-editor/m-p/398298#M5624</guid>
      <dc:creator>easyDoesIt</dc:creator>
      <dc:date>2023-09-15T01:07:17Z</dc:date>
    </item>
    <item>
      <title>Re: how to know if the script is being run in library editor</title>
      <link>https://community.graphisoft.com/t5/GDL/how-to-know-if-the-script-is-being-run-in-library-editor/m-p/398313#M5625</link>
      <description>&lt;P&gt;Sorry for the late reply, thanks&amp;nbsp;&lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/33320"&gt;@Peter&lt;/a&gt;. I just did a quick test, I put this line of code in the 2d script&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if GLOB_PREVIEW_MODE = 0 then text2 0,0,"GDL Editor only."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the text appeared in plan view also (outside of gdl editor).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think i give up, I will just comment in and out what I need to do while coding and rely on QA to ensure commented out in final release.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Sep 2023 04:58:44 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/how-to-know-if-the-script-is-being-run-in-library-editor/m-p/398313#M5625</guid>
      <dc:creator>easyDoesIt</dc:creator>
      <dc:date>2023-09-15T04:58:44Z</dc:date>
    </item>
  </channel>
</rss>

