<?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: Can GDL tell if a layer is on or off? in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/Can-GDL-tell-if-a-layer-is-on-or-off/m-p/90371#M38484</link>
    <description>&lt;BLOCKQUOTE&gt;Aussie wrote:&lt;BR /&gt;I know is not the same but often you dont want to see the text when the scale gets too small so you library part can be scripted to not show text at certain scales&lt;/BLOCKQUOTE&gt;

Sure  - use the global variable : &lt;BR /&gt;
&lt;BR /&gt;
if smaller than Glob_scale then text (else not)</description>
    <pubDate>Sun, 09 Jan 2005 08:41:50 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2005-01-09T08:41:50Z</dc:date>
    <item>
      <title>Can GDL tell if a layer is on or off?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-GDL-tell-if-a-layer-is-on-or-off/m-p/90367#M38480</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;I am trying to create a library part that shows lines and text when a "text layer" is turned on in the layer settings, but only show the lines when the "text layer" is turned off.&lt;BR /&gt;
&lt;BR /&gt;
Again, control over the visibility of the text must be dependent upon the layer settings, not a parameter in the object itself.&lt;BR /&gt;
&lt;BR /&gt;
Is there a way to do this? and if so, how?&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
Wes&lt;/T&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 05 Jan 2005 21:34:14 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-GDL-tell-if-a-layer-is-on-or-off/m-p/90367#M38480</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-01-05T21:34:14Z</dc:date>
    </item>
    <item>
      <title>Re: Can GDL tell if a layer is on or off?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-GDL-tell-if-a-layer-is-on-or-off/m-p/90368#M38481</link>
      <description>Weston,&lt;BR /&gt;
I am afraid that's not possible. Check globals/requests in the AC help but I think there is nothing about the actual layer status.</description>
      <pubDate>Wed, 05 Jan 2005 22:06:40 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-GDL-tell-if-a-layer-is-on-or-off/m-p/90368#M38481</guid>
      <dc:creator>Rob</dc:creator>
      <dc:date>2005-01-05T22:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: Can GDL tell if a layer is on or off?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-GDL-tell-if-a-layer-is-on-or-off/m-p/90369#M38482</link>
      <description>&lt;BLOCKQUOTE&gt;Weston wrote:&lt;BR /&gt;I am trying to create a library part that shows lines and text when a "text layer" is turned on in the layer settings, but only show the lines when the "text layer" is turned off.&lt;/BLOCKQUOTE&gt;

Library parts can ask which zones they are in, and they can be in any number of overlapping zones at that.  The only zones that are retrieved by the zone request are the visible ones.  You can take advantage of that.&lt;BR /&gt;
&lt;BR /&gt;
Define a zone category with white as the color.  In your 'text layer', draw a zone with this white zone category that is as large as the drawing extents and copy it to every story that you will be using your object on.  (It would seem that one very tall zone placed on the lowest story would work, but it seems that zone awareness is a 2D thing even though zones are 3D.)&lt;BR /&gt;
&lt;BR /&gt;
Inside your object use a dynamic array and request similar to this:&lt;BR /&gt;

&lt;PRE&gt;dim strParams[]
nParamCount=request ("Zone_relations", "",strParams)

nZoneCount = nParamCount / 4
text2 0, 0, "zone count="+str(nZoneCount,3,0)

for nRow=1 to nParamCount
	add2 0, -0.2
	text2 0, 0, strParams[nRow]
next nRow&lt;/PRE&gt;

and instead of displaying the values of the parameters, iterate through them (in steps of 4) to see if your special zone name is present ... if so , then you know that the text layer is on, if not, you know that it is off.&lt;BR /&gt;
&lt;BR /&gt;
This weird workaround only works if your object is only used in plan (story) views.  Out of luck with sections and details.  (You could do something goofy with a global variable set by an auxiliary part in plan, but the variable wouldn't be changed if you changed layer settings while viewing the detail ... you'd have to rebuild the plan, then go back to the detail.  So... no reproducible behavior for document publishing.)&lt;BR /&gt;
&lt;BR /&gt;
Hopefully there is a better idea out there...&lt;BR /&gt;
&lt;BR /&gt;
Karl</description>
      <pubDate>Thu, 06 Jan 2005 02:32:31 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-GDL-tell-if-a-layer-is-on-or-off/m-p/90369#M38482</guid>
      <dc:creator>Karl Ottenstein</dc:creator>
      <dc:date>2005-01-06T02:32:31Z</dc:date>
    </item>
    <item>
      <title>Re: Can GDL tell if a layer is on or off?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-GDL-tell-if-a-layer-is-on-or-off/m-p/90370#M38483</link>
      <description>I know is not the same but often you dont want to see the text when the scale gets too small so you library part can be scripted to not show text at certain scales</description>
      <pubDate>Thu, 06 Jan 2005 05:31:54 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-GDL-tell-if-a-layer-is-on-or-off/m-p/90370#M38483</guid>
      <dc:creator>Aussie John</dc:creator>
      <dc:date>2005-01-06T05:31:54Z</dc:date>
    </item>
    <item>
      <title>Re: Can GDL tell if a layer is on or off?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-GDL-tell-if-a-layer-is-on-or-off/m-p/90371#M38484</link>
      <description>&lt;BLOCKQUOTE&gt;Aussie wrote:&lt;BR /&gt;I know is not the same but often you dont want to see the text when the scale gets too small so you library part can be scripted to not show text at certain scales&lt;/BLOCKQUOTE&gt;

Sure  - use the global variable : &lt;BR /&gt;
&lt;BR /&gt;
if smaller than Glob_scale then text (else not)</description>
      <pubDate>Sun, 09 Jan 2005 08:41:50 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-GDL-tell-if-a-layer-is-on-or-off/m-p/90371#M38484</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-01-09T08:41:50Z</dc:date>
    </item>
    <item>
      <title>Re: Can GDL tell if a layer is on or off?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-GDL-tell-if-a-layer-is-on-or-off/m-p/90372#M38485</link>
      <description>We use these workarounds at our office. Specific pen set for object labeling, PlotMaker layout has that pen turned white if text not needed. True 255,255,255 white doesn't plot (atleast with our plotters) even with "everything black" checked, which is perfect for us.&lt;BR /&gt;
&lt;BR /&gt;
Opening object and disabling text (or anything else) with ! in GDL code takes few seconds. Plot or print or save DWG without unwanted information. Much faster than fidling with objects parameters.&lt;BR /&gt;
&lt;BR /&gt;
Your GDL request belongs to my long list of GDL improvements, too.</description>
      <pubDate>Fri, 04 Feb 2005 18:27:42 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-GDL-tell-if-a-layer-is-on-or-off/m-p/90372#M38485</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-02-04T18:27:42Z</dc:date>
    </item>
  </channel>
</rss>

