<?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 convert numbers to string values in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/How-to-convert-numbers-to-string-values/m-p/103751#M40614</link>
    <description>Is it true that the SPLIT command will change numbers written as string into numbers?&lt;BR /&gt;
&lt;BR /&gt;
For example the expression of
&lt;PRE&gt;stringtext=134.56
SPLIT(stringtext," %n", stringnumber)&lt;/PRE&gt;

Then I would get  a number instead of text?&lt;BR /&gt;
&lt;BR /&gt;
TIA</description>
    <pubDate>Thu, 26 Aug 2004 03:57:12 GMT</pubDate>
    <dc:creator>tsturm</dc:creator>
    <dc:date>2004-08-26T03:57:12Z</dc:date>
    <item>
      <title>How to convert numbers to string values</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/How-to-convert-numbers-to-string-values/m-p/103749#M40612</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;R&gt;Can anyone out there tell me how they would convert a number value to a string value?&lt;BR /&gt;
&lt;BR /&gt;
I need to change numbers into text so that I can combine text strings in the TEXT2 command.&lt;BR /&gt;
&lt;BR /&gt;
What can be done?&lt;BR /&gt;
&lt;BR /&gt;
for example...&lt;BR /&gt;
&lt;BR /&gt;
I want to have the text from the file name "TYP B00 3D" read as "B12 3D"&lt;BR /&gt;
&lt;BR /&gt;
I have set up a series of string commands to break the name into different parameters.&lt;BR /&gt;
&lt;BR /&gt;
Thus there is &lt;BR /&gt;
&lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;textparts=SPLIT(part_name, "%s %s%n %n%s", junk, cab, cabsize, drawernum, cabtyp)&lt;BR /&gt;
&lt;BR /&gt;
junk= !TYP&lt;BR /&gt;
cab=   ! B&lt;BR /&gt;
cabsize=00&lt;BR /&gt;
drawernum=3&lt;BR /&gt;
cabtyp=  ! D&lt;BR /&gt;
A=12&lt;BR /&gt;
&lt;BR /&gt;
TEXT2 0, 0, cab+A+" "+drawernum+cabtyp&lt;E&gt;&lt;/E&gt;&lt;BR /&gt;
&lt;BR /&gt;
Problem is this express has syntax errors. I need to change the "A" and "drawernum" parameters into text values.&lt;BR /&gt;
&lt;BR /&gt;
How can this be done?&lt;BR /&gt;
&lt;BR /&gt;
TIA&lt;/R&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 25 Aug 2004 17:04:39 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/How-to-convert-numbers-to-string-values/m-p/103749#M40612</guid>
      <dc:creator>tsturm</dc:creator>
      <dc:date>2004-08-25T17:04:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert numbers to string values</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/How-to-convert-numbers-to-string-values/m-p/103750#M40613</link>
      <description>&lt;BLOCKQUOTE&gt;tsturm wrote:&lt;BR /&gt;Problem is this express has syntax errors. I need to change the "A" and "drawernum" parameters into text values. How can this be done? &lt;/BLOCKQUOTE&gt;
Take a look at the STR function. For example, if A has the value 123, the expression STR(A, 3, 0) changes it to the string "123".</description>
      <pubDate>Wed, 25 Aug 2004 20:53:00 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/How-to-convert-numbers-to-string-values/m-p/103750#M40613</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2004-08-25T20:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert numbers to string values</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/How-to-convert-numbers-to-string-values/m-p/103751#M40614</link>
      <description>Is it true that the SPLIT command will change numbers written as string into numbers?&lt;BR /&gt;
&lt;BR /&gt;
For example the expression of
&lt;PRE&gt;stringtext=134.56
SPLIT(stringtext," %n", stringnumber)&lt;/PRE&gt;

Then I would get  a number instead of text?&lt;BR /&gt;
&lt;BR /&gt;
TIA</description>
      <pubDate>Thu, 26 Aug 2004 03:57:12 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/How-to-convert-numbers-to-string-values/m-p/103751#M40614</guid>
      <dc:creator>tsturm</dc:creator>
      <dc:date>2004-08-26T03:57:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert numbers to string values</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/How-to-convert-numbers-to-string-values/m-p/103752#M40615</link>
      <description>&lt;BLOCKQUOTE&gt;tsturm wrote:&lt;BR /&gt;Is it true that the SPLIT command will change numbers written as string into numbers?&lt;BR /&gt;
&lt;BR /&gt;
For example the expression of
&lt;PRE&gt;stringtext=134.56
SPLIT(stringtext," %n", stringnumber)&lt;/PRE&gt;

Then I would get  a number instead of text?&lt;BR /&gt;
&lt;BR /&gt;
TIA&lt;/BLOCKQUOTE&gt;

Close - try something like this:
&lt;PRE&gt;strVal = "123.45"
numVal = 0
howMany = split(strVal, "%n", numVal)&lt;/PRE&gt;

You will end up with the numeric equivalent of 'strVal' in 'numVal', and 'howMany' should be 1 to tell you that one value was extracted from the string.</description>
      <pubDate>Thu, 26 Aug 2004 20:33:26 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/How-to-convert-numbers-to-string-values/m-p/103752#M40615</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2004-08-26T20:33:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert numbers to string values</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/How-to-convert-numbers-to-string-values/m-p/103753#M40616</link>
      <description>I think that I now have a better understanding of how to change numbers into text and back again.&lt;BR /&gt;
&lt;BR /&gt;
Now if GS would just make a STRING command to simply toggle the stuff around I would not need to type out things such as 
&lt;PRE&gt;part_num=159684
part_name=STR(part_num, 7, 0)&lt;/PRE&gt;
to change numbers to text.&lt;BR /&gt;
&lt;BR /&gt;
How about a command like &lt;B&gt;STNT(number)&lt;/B&gt; to change numbers to text and &lt;B&gt;STTN(string)&lt;/B&gt; to change text to numbers.&lt;BR /&gt;
&lt;BR /&gt;
Perhaps.</description>
      <pubDate>Fri, 27 Aug 2004 16:03:51 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/How-to-convert-numbers-to-string-values/m-p/103753#M40616</guid>
      <dc:creator>tsturm</dc:creator>
      <dc:date>2004-08-27T16:03:51Z</dc:date>
    </item>
  </channel>
</rss>

