<?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: Extracting part of a global variable in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/Extracting-part-of-a-global-variable/m-p/125077#M21264</link>
    <description>Thanks again Barry,&lt;BR /&gt;
All working fine now!!&lt;BR /&gt;
Cheers</description>
    <pubDate>Wed, 14 Apr 2010 06:53:18 GMT</pubDate>
    <dc:creator>Wokka</dc:creator>
    <dc:date>2010-04-14T06:53:18Z</dc:date>
    <item>
      <title>Extracting part of a global variable</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Extracting-part-of-a-global-variable/m-p/125073#M21260</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;Hi guys,&lt;BR /&gt;
Hopefully a simple request..?&lt;BR /&gt;
I've created a simple label to extract a walls composite name. The problem is the name is too long to be practical on a floor plan ie:&lt;BR /&gt;
&lt;BR /&gt;
'WT06 - Reverse Brick Veneer.'&lt;BR /&gt;
&lt;BR /&gt;
I'd like the label to just note the first 4 letters. "WT06"&lt;BR /&gt;
I vaguely recall seeing the ability in GDL a long time ago....&lt;BR /&gt;
&lt;BR /&gt;
Is there a way I can specify just these few letters instead of the whole name?&lt;BR /&gt;
&lt;BR /&gt;
Cheers&lt;/T&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 14 Apr 2010 05:03:35 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Extracting-part-of-a-global-variable/m-p/125073#M21260</guid>
      <dc:creator>Wokka</dc:creator>
      <dc:date>2010-04-14T05:03:35Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting part of a global variable</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Extracting-part-of-a-global-variable/m-p/125074#M21261</link>
      <description>STRSUB is the command you are after.&lt;BR /&gt;
For the first 4 characters of your name you want &lt;FONT color="#ff001b"&gt;STRSUB(composite name, 1,4)&lt;/FONT&gt;&lt;BR /&gt;
&lt;BR /&gt;
Barry.</description>
      <pubDate>Wed, 14 Apr 2010 05:16:55 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Extracting-part-of-a-global-variable/m-p/125074#M21261</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2010-04-14T05:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting part of a global variable</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Extracting-part-of-a-global-variable/m-p/125075#M21262</link>
      <description>Barry,&lt;BR /&gt;
Fantastic, thanks for that. I knew it was somewhere.&lt;BR /&gt;
The problem is, as I've 'hacked' the original ARchiCad object, I don't fully understand all the manipulations required to get the final result.&lt;BR /&gt;
I placed in the masterscript:&lt;BR /&gt;
&lt;BR /&gt;
&lt;FONT color="#002dff"&gt;&lt;BR /&gt;
If gs_content_type = `Composite` then&lt;BR /&gt;
		identify = WALL_COMPS_NAME&lt;BR /&gt;
endif&lt;BR /&gt;
&lt;/FONT&gt;&lt;BR /&gt;
&lt;BR /&gt;
after adding a new parameter to the parameter list.&lt;BR /&gt;
Where do I insert your bit of script?&lt;BR /&gt;
Thanks again...I know time is money...&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;FONT color="#ff0051"&gt;DON"T PANIC thanks but I got it to work! Cheers again!&lt;/FONT&gt;</description>
      <pubDate>Wed, 14 Apr 2010 06:11:09 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Extracting-part-of-a-global-variable/m-p/125075#M21262</guid>
      <dc:creator>Wokka</dc:creator>
      <dc:date>2010-04-14T06:11:09Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting part of a global variable</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Extracting-part-of-a-global-variable/m-p/125076#M21263</link>
      <description>In your 2D script there will be a TEXT2 command to add the text for the name.&lt;BR /&gt;
&lt;BR /&gt;
i.e. TEXT2 0,0, identify&lt;BR /&gt;
&lt;BR /&gt;
You will wnt to change this to TEXT2 0,0, STRSUB(identify,1,4)&lt;BR /&gt;
&lt;BR /&gt;
I am assuming you are using the variable "identify" to hold the name of the composite.&lt;BR /&gt;
But watch out because it looks like when your "gs_content_type" parameter is not `Composite` then you will have a blank "identify" parameter and no text will appear.&lt;BR /&gt;
I can't say for sure without seeing all of the script.&lt;BR /&gt;
&lt;BR /&gt;
Barry.</description>
      <pubDate>Wed, 14 Apr 2010 06:26:12 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Extracting-part-of-a-global-variable/m-p/125076#M21263</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2010-04-14T06:26:12Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting part of a global variable</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Extracting-part-of-a-global-variable/m-p/125077#M21264</link>
      <description>Thanks again Barry,&lt;BR /&gt;
All working fine now!!&lt;BR /&gt;
Cheers</description>
      <pubDate>Wed, 14 Apr 2010 06:53:18 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Extracting-part-of-a-global-variable/m-p/125077#M21264</guid>
      <dc:creator>Wokka</dc:creator>
      <dc:date>2010-04-14T06:53:18Z</dc:date>
    </item>
  </channel>
</rss>

