<?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: Parameter Label in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/Parameter-Label/m-p/191518#M15235</link>
    <description>Hi,&lt;BR /&gt;
Sorry I have just realised how rushed and rude my first comment was.&lt;BR /&gt;
It is an ArchiCAD 16 Label&lt;BR /&gt;
Basically I have used the following command in the master script&lt;BR /&gt;
&lt;BR /&gt;
pc=REQUEST ("ASSOCLP_PARVALUE", "pcolour", nameind_pc, type_pc, flag_pc, dim1_pc, dim2_pc, val_pc)&lt;BR /&gt;
&lt;BR /&gt;
Now what I want to use in the 2D script is the 'val_pc'&lt;BR /&gt;
&lt;BR /&gt;
In the object I want to label I have the parameter 'pcolour' with the values (val_pc)&lt;BR /&gt;
01 Black Caviar&lt;BR /&gt;
02 Highlander&lt;BR /&gt;
03 Jurassic Park&lt;BR /&gt;
......&lt;BR /&gt;
18 Vivid White&lt;BR /&gt;
&lt;BR /&gt;
I want to know how to translate this into text to use in a text2 command.&lt;BR /&gt;
&lt;BR /&gt;
Then I want to split the text so I only see the number (eg, '01')&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Im guessing I use the STW then SPLIT commands, but my puny brain cant work it out.&lt;BR /&gt;
&lt;BR /&gt;
Tom</description>
    <pubDate>Mon, 10 Sep 2012 22:46:54 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-09-10T22:46:54Z</dc:date>
    <item>
      <title>Parameter Label</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Parameter-Label/m-p/191516#M15233</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;Hi,&lt;BR /&gt;
I am having real difficulty creating a label for an object I have made.&lt;BR /&gt;
It is an object with a parameter that when I change it, it changes the panel material colour.&lt;BR /&gt;
Now I have got this label to work, however it comes up with error messages within the 2D script. Im sure it is just because I have coded it a bit messy.&lt;BR /&gt;
Does anyone have any ideas how I could code this and avoid the error?&lt;/T&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 10 Sep 2012 06:47:33 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Parameter-Label/m-p/191516#M15233</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-10T06:47:33Z</dc:date>
    </item>
    <item>
      <title>Re: Parameter Label</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Parameter-Label/m-p/191517#M15234</link>
      <description>Tom,&lt;BR /&gt;
Is this object a LABEL or a general object?&lt;BR /&gt;
Because I have a problem when I try to load it as a label object:</description>
      <pubDate>Mon, 10 Sep 2012 09:30:47 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Parameter-Label/m-p/191517#M15234</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-10T09:30:47Z</dc:date>
    </item>
    <item>
      <title>Re: Parameter Label</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Parameter-Label/m-p/191518#M15235</link>
      <description>Hi,&lt;BR /&gt;
Sorry I have just realised how rushed and rude my first comment was.&lt;BR /&gt;
It is an ArchiCAD 16 Label&lt;BR /&gt;
Basically I have used the following command in the master script&lt;BR /&gt;
&lt;BR /&gt;
pc=REQUEST ("ASSOCLP_PARVALUE", "pcolour", nameind_pc, type_pc, flag_pc, dim1_pc, dim2_pc, val_pc)&lt;BR /&gt;
&lt;BR /&gt;
Now what I want to use in the 2D script is the 'val_pc'&lt;BR /&gt;
&lt;BR /&gt;
In the object I want to label I have the parameter 'pcolour' with the values (val_pc)&lt;BR /&gt;
01 Black Caviar&lt;BR /&gt;
02 Highlander&lt;BR /&gt;
03 Jurassic Park&lt;BR /&gt;
......&lt;BR /&gt;
18 Vivid White&lt;BR /&gt;
&lt;BR /&gt;
I want to know how to translate this into text to use in a text2 command.&lt;BR /&gt;
&lt;BR /&gt;
Then I want to split the text so I only see the number (eg, '01')&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Im guessing I use the STW then SPLIT commands, but my puny brain cant work it out.&lt;BR /&gt;
&lt;BR /&gt;
Tom</description>
      <pubDate>Mon, 10 Sep 2012 22:46:54 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Parameter-Label/m-p/191518#M15235</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-10T22:46:54Z</dc:date>
    </item>
    <item>
      <title>Re: Parameter Label</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Parameter-Label/m-p/191519#M15236</link>
      <description>Hello,&lt;BR /&gt;

&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;findspace= strstr(val_pc, " ")
codeonly= strsub(val_pc, 1, findspace-1)
text2 0, 0, codeonly

&lt;/PRE&gt;

Hope this works</description>
      <pubDate>Tue, 11 Sep 2012 19:25:55 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Parameter-Label/m-p/191519#M15236</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-11T19:25:55Z</dc:date>
    </item>
    <item>
      <title>Re: Parameter Label</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Parameter-Label/m-p/191520#M15237</link>
      <description>Thanks Juha,&lt;BR /&gt;
The code you did essentially works, however I get the 2D code error of 'STRING TYPE EXPESSION'.&lt;BR /&gt;
This is quite frustrating as when I open the label tool, I get this message popping up.&lt;BR /&gt;
&lt;BR /&gt;
Is there something I need to type after the REQUEST command in the master script the change the expression?</description>
      <pubDate>Tue, 11 Sep 2012 23:21:23 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Parameter-Label/m-p/191520#M15237</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-11T23:21:23Z</dc:date>
    </item>
    <item>
      <title>Re: Parameter Label</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Parameter-Label/m-p/191521#M15238</link>
      <description>Just got it workings.&lt;BR /&gt;
I just needed to add val_pc as a parameter, which I made hidden.&lt;BR /&gt;
&lt;BR /&gt;
Works great.&lt;BR /&gt;
Thank you!</description>
      <pubDate>Tue, 11 Sep 2012 23:39:45 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Parameter-Label/m-p/191521#M15238</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-11T23:39:45Z</dc:date>
    </item>
    <item>
      <title>Re: Parameter Label</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Parameter-Label/m-p/191522#M15239</link>
      <description>If You added before the operations:
&lt;PRE&gt;val_pc=""&lt;/PRE&gt;

You would not need to add it as parameter.&lt;BR /&gt;
&lt;BR /&gt;
Best Regards,&lt;BR /&gt;
Piotr</description>
      <pubDate>Wed, 12 Sep 2012 07:27:09 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Parameter-Label/m-p/191522#M15239</guid>
      <dc:creator>Piotr Dobrowolski</dc:creator>
      <dc:date>2012-09-12T07:27:09Z</dc:date>
    </item>
  </channel>
</rss>

