<?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 a parameter change itself? in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/Can-a-parameter-change-itself/m-p/239141#M8515</link>
    <description>Hi Barry. I think I mislead you with my example into thinking I wanted to eliminate everything after the decimal point. Actually I just wanted to "supress" all trailing zeros and have a maximum of two places after the point. I dug into the GDL reference guide, found the str function and with some trial and error came up with this;&lt;BR /&gt;
&lt;BR /&gt;
STR("%~.2",PII)+"/12"&lt;BR /&gt;
&lt;BR /&gt;
The "tide" symbol ~ (I had to look up the name and it's very fitting) suppresses the trailing zeros and the 2 is the max number of places after the decimal point. &lt;BR /&gt;
&lt;BR /&gt;
Thanks again for the assist.&lt;BR /&gt;
Doug</description>
    <pubDate>Thu, 03 Dec 2015 20:51:32 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-12-03T20:51:32Z</dc:date>
    <item>
      <title>Can a parameter change itself?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-a-parameter-change-itself/m-p/239135#M8509</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;Hi all.&lt;BR /&gt;
I swear I've done this before but am losing my mind trying to get it to work.&lt;BR /&gt;
This is an example of my code in the parameter script;&lt;BR /&gt;
&lt;BR /&gt;
IF LN = "Arm @" THEN LN = "Doug"&lt;BR /&gt;
PARAMETERS LN = LN&lt;BR /&gt;
&lt;BR /&gt;
The parameter LN is set in a list of values above the code.&lt;BR /&gt;
&lt;BR /&gt;
I have this in a different object and it works fine;&lt;BR /&gt;
&lt;BR /&gt;
IF A &amp;lt; 2" THEN A = 2" &lt;BR /&gt;
PARAMETERS A = A &lt;BR /&gt;
&lt;BR /&gt;
Any thoughts?&lt;BR /&gt;
Thanks, Doug&lt;/T&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 01 Dec 2015 23:16:23 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-a-parameter-change-itself/m-p/239135#M8509</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-12-01T23:16:23Z</dc:date>
    </item>
    <item>
      <title>Re: Can a parameter change itself?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-a-parameter-change-itself/m-p/239136#M8510</link>
      <description>Is "Doug" in the VALUE list of available parameters?&lt;BR /&gt;
If not you are trying to set it to something that it can not be.&lt;BR /&gt;
&lt;BR /&gt;
Barry.</description>
      <pubDate>Wed, 02 Dec 2015 01:57:28 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-a-parameter-change-itself/m-p/239136#M8510</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2015-12-02T01:57:28Z</dc:date>
    </item>
    <item>
      <title>Re: Can a parameter change itself?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-a-parameter-change-itself/m-p/239137#M8511</link>
      <description>Thanks Barry. Though I thought I'd been in this situation before, your solution didn't ring a bell. After modifying the code though your explanation made perfect sense. I added a "Dummy" parameter that the LN parameter reads from. (The LN parameter is required for scheduling). The code below works fine except that I would like to add the section in red. PII (Pitch in inches) is a real number parameter that is predefined. I'd like to end up with...Arm @ 10/12. I can probably figure it out but it's gonna have to wait till tomorrow! I appreciate the help. Doug&lt;BR /&gt;
&lt;BR /&gt;
VALUES "FLN" 'Arm', 'Arm @'&lt;BR /&gt;
&lt;BR /&gt;
PARAMETERS LN = FLN&lt;BR /&gt;
&lt;BR /&gt;
IF FLN = "Arm @" THEN&lt;BR /&gt;
PARAMETERS LN ="Arm @ "&lt;FONT color="#FF0024"&gt; + PII + "/12"&lt;/FONT&gt;&lt;BR /&gt;
ENDIF</description>
      <pubDate>Wed, 02 Dec 2015 03:33:24 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-a-parameter-change-itself/m-p/239137#M8511</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-12-02T03:33:24Z</dc:date>
    </item>
    <item>
      <title>Re: Can a parameter change itself?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-a-parameter-change-itself/m-p/239138#M8512</link>
      <description>You will need to use the STR function to convert your number into a string value.&lt;BR /&gt;
&lt;BR /&gt;
Barry.</description>
      <pubDate>Wed, 02 Dec 2015 03:43:18 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-a-parameter-change-itself/m-p/239138#M8512</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2015-12-02T03:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: Can a parameter change itself?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-a-parameter-change-itself/m-p/239139#M8513</link>
      <description>Thanks again for the help last night Barry. I wound up getting it to work before I called it a night. I've used the str function in the past but just needed to refresh my memory. This is what I came up with:&lt;BR /&gt;
&lt;BR /&gt;
PARAMETERS LN = FLN&lt;BR /&gt;
PARAMETERS PII = 12*(TAN(P))&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
IF FLN = "Arm @" THEN&lt;BR /&gt;
PARAMETERS LN = "Arm @"+STR(PII,3,2)+"/12"&lt;BR /&gt;
ENDIF&lt;BR /&gt;
&lt;BR /&gt;
Something I couldn't find though is a way to suppress zeros after the decimal point. (eg. 10 instead of 10.00) Can you save me some research time and tell me if it's possible?&lt;BR /&gt;
&lt;BR /&gt;
Thanks again, Doug</description>
      <pubDate>Wed, 02 Dec 2015 23:56:22 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-a-parameter-change-itself/m-p/239139#M8513</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-12-02T23:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: Can a parameter change itself?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-a-parameter-change-itself/m-p/239140#M8514</link>
      <description>That would be the '2' in your STR function.&lt;BR /&gt;
&lt;BR /&gt;
STR(PII,3,&lt;FONT color="#ff0000"&gt;2&lt;/FONT&gt;)&lt;BR /&gt;
&lt;BR /&gt;
That is the length of the number after the decimal point.&lt;BR /&gt;
&lt;BR /&gt;
STR(PII,3,&lt;FONT color="#ff0000"&gt;0&lt;/FONT&gt;) ... should be what you are after.&lt;BR /&gt;
&lt;BR /&gt;
The '3' if the minimum number of characters in the string.&lt;BR /&gt;
It will automatically increase them if you have a larger number and will pad with spaces if you have a smaller number.&lt;BR /&gt;
&lt;BR /&gt;
So you could actually try ... STR(PII,&lt;FONT color="#ff0000"&gt;1,0&lt;/FONT&gt;)&lt;BR /&gt;
&lt;BR /&gt;
Barry.</description>
      <pubDate>Thu, 03 Dec 2015 01:40:20 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-a-parameter-change-itself/m-p/239140#M8514</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2015-12-03T01:40:20Z</dc:date>
    </item>
    <item>
      <title>Re: Can a parameter change itself?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-a-parameter-change-itself/m-p/239141#M8515</link>
      <description>Hi Barry. I think I mislead you with my example into thinking I wanted to eliminate everything after the decimal point. Actually I just wanted to "supress" all trailing zeros and have a maximum of two places after the point. I dug into the GDL reference guide, found the str function and with some trial and error came up with this;&lt;BR /&gt;
&lt;BR /&gt;
STR("%~.2",PII)+"/12"&lt;BR /&gt;
&lt;BR /&gt;
The "tide" symbol ~ (I had to look up the name and it's very fitting) suppresses the trailing zeros and the 2 is the max number of places after the decimal point. &lt;BR /&gt;
&lt;BR /&gt;
Thanks again for the assist.&lt;BR /&gt;
Doug</description>
      <pubDate>Thu, 03 Dec 2015 20:51:32 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-a-parameter-change-itself/m-p/239141#M8515</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-12-03T20:51:32Z</dc:date>
    </item>
  </channel>
</rss>

