<?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 change variables type? in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/How-to-change-variables-type/m-p/56183#M35989</link>
    <description>Or use an ARRAY and try something like this:&lt;BR /&gt;
&lt;BR /&gt;
DIM door[999]&lt;BR /&gt;
&lt;BR /&gt;
FOR k=1 TO 999&lt;BR /&gt;
	if door&lt;K&gt;=1 then&lt;BR /&gt;
	a="abc"+STR(k,3,0)+"def"&lt;BR /&gt;
	gosub (k+10)*100&lt;BR /&gt;
	endif &lt;BR /&gt;
NEXT k&lt;/K&gt;</description>
    <pubDate>Wed, 05 Oct 2005 17:28:59 GMT</pubDate>
    <dc:creator>Jochen Suehlo</dc:creator>
    <dc:date>2005-10-05T17:28:59Z</dc:date>
    <item>
      <title>How to change variables type?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/How-to-change-variables-type/m-p/56181#M35987</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;I need to change variable type but don't know how.&lt;BR /&gt;
&lt;BR /&gt;
 for example , from a number to a string or from a string to a number?&lt;BR /&gt;
&lt;BR /&gt;
Then reason I need this  because I need to script something like this&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
                           if door_01=1 then&lt;BR /&gt;
                                   a="abc01def"&lt;BR /&gt;
                                   gosub 1100&lt;BR /&gt;
                           endif&lt;BR /&gt;
&lt;BR /&gt;
                           if door_02=1 then&lt;BR /&gt;
                                   a="abc02def"&lt;BR /&gt;
                                   gosub 1200&lt;BR /&gt;
                           endif&lt;BR /&gt;
                                     .&lt;BR /&gt;
                                     .&lt;BR /&gt;
                                     .&lt;BR /&gt;
                           if door_999=1 then&lt;BR /&gt;
                                   a="abc999def"&lt;BR /&gt;
                                   gosub 100900&lt;BR /&gt;
                           endif&lt;BR /&gt;
&lt;BR /&gt;
if would be much easier if I use a FOR sentence. but need to do some variables type change I think. &lt;BR /&gt;
&lt;BR /&gt;
Does anybody know how?&lt;BR /&gt;
&lt;BR /&gt;
thanks a lot&lt;BR /&gt;
&lt;BR /&gt;
peter aareas&lt;/T&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 03 Oct 2005 18:47:00 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/How-to-change-variables-type/m-p/56181#M35987</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-10-03T18:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to change variables type?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/How-to-change-variables-type/m-p/56182#M35988</link>
      <description>Peter,&lt;BR /&gt;
One way you might try is to use "values" in the parameter script.&lt;BR /&gt;
Make a text type parameter, name it "dtyp" (or something),&lt;BR /&gt;
then in the parameters script make a list something like this.&lt;BR /&gt;
&lt;BR /&gt;
values  "dtyp"  "door_01",door_2","door_3",...etc&lt;BR /&gt;
&lt;BR /&gt;
This creates a pull down list in the lib part settings that allows&lt;BR /&gt;
the user to select a door type.&lt;BR /&gt;
&lt;BR /&gt;
Then you can use your if statements this way.&lt;BR /&gt;
if dtyp="door_1" then.....&lt;BR /&gt;
if dtyp="door_2" then....&lt;BR /&gt;
&lt;BR /&gt;
There are many other ways but this is an easy one.&lt;BR /&gt;
Peter Devlin</description>
      <pubDate>Mon, 03 Oct 2005 20:03:25 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/How-to-change-variables-type/m-p/56182#M35988</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-10-03T20:03:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to change variables type?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/How-to-change-variables-type/m-p/56183#M35989</link>
      <description>Or use an ARRAY and try something like this:&lt;BR /&gt;
&lt;BR /&gt;
DIM door[999]&lt;BR /&gt;
&lt;BR /&gt;
FOR k=1 TO 999&lt;BR /&gt;
	if door&lt;K&gt;=1 then&lt;BR /&gt;
	a="abc"+STR(k,3,0)+"def"&lt;BR /&gt;
	gosub (k+10)*100&lt;BR /&gt;
	endif &lt;BR /&gt;
NEXT k&lt;/K&gt;</description>
      <pubDate>Wed, 05 Oct 2005 17:28:59 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/How-to-change-variables-type/m-p/56183#M35989</guid>
      <dc:creator>Jochen Suehlo</dc:creator>
      <dc:date>2005-10-05T17:28:59Z</dc:date>
    </item>
  </channel>
</rss>

