<?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: Converting integer/numeric data to text data in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/Converting-integer-numeric-data-to-text-data/m-p/221807#M11680</link>
    <description>Glad I could help.&lt;BR /&gt;
&lt;BR /&gt;
At first glance, the guide is not that friendly. It is more technical sort of writing; but once you get how it is structured, it's an invaluable resource (along with the other GDL books out there).&lt;BR /&gt;
&lt;BR /&gt;
Best regards.</description>
    <pubDate>Wed, 05 Nov 2014 23:00:14 GMT</pubDate>
    <dc:creator>sinceV6</dc:creator>
    <dc:date>2014-11-05T23:00:14Z</dc:date>
    <item>
      <title>Converting integer/numeric data to text data</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Converting-integer-numeric-data-to-text-data/m-p/221802#M11675</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;Hi, as the title says I was wondering if there is a way to convert an integer/numeric data into a text data (please bear with my scripting ignorance).&lt;BR /&gt;
What I'm trying to create is a label for my roofs. It's a simple triangle with 2 different text values that indicates the roof slope (only 2d). What I've done so far is: I created a new Integer Parameter named as 'Roof Slope' and I'm using that value in order to change the length in the triangle sides and also replace the text accordingly (so far everything works). The problem is that I need that same value from the 'Roof Slope Parameter' to show up also as TEXT, replacing the one of the two originally texts that I have in there. Is there a way to achieve that??&lt;BR /&gt;
Thanks!&lt;/T&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 05 Nov 2014 17:32:43 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Converting-integer-numeric-data-to-text-data/m-p/221802#M11675</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-11-05T17:32:43Z</dc:date>
    </item>
    <item>
      <title>Re: Converting integer/numeric data to text data</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Converting-integer-numeric-data-to-text-data/m-p/221803#M11676</link>
      <description>Hi.&lt;BR /&gt;
&lt;BR /&gt;
Look into the string functions in the GDL reference guide. The STR and STR{2} functions.&lt;BR /&gt;
&lt;BR /&gt;
Best regards.</description>
      <pubDate>Wed, 05 Nov 2014 19:45:40 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Converting-integer-numeric-data-to-text-data/m-p/221803#M11676</guid>
      <dc:creator>sinceV6</dc:creator>
      <dc:date>2014-11-05T19:45:40Z</dc:date>
    </item>
    <item>
      <title>Re: Converting integer/numeric data to text data</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Converting-integer-numeric-data-to-text-data/m-p/221804#M11677</link>
      <description>Thanks for your quick responce sinceV6. I tried the STR command as it says on the reference guide but it didn't work. Here is my script:&lt;BR /&gt;

&lt;PRE&gt;mul2     A/0.474913, B/0.443089
add2     19'-3.5711", -24'-8.9653"
pen     penAttribute_1
hotspot2 -18'-8.8737", 24'-8.9653"
hotspot2 -18'-8.8737", 25'-8.9653"
hotspot2 -17'-8.8737", 25'-8.9653"
hotspot2 -19'-0.2224", 25'-3.0683"
hotspot2 -18'-3.0084", 25'-11.6875"
pen     penAttribute_2
line_property       0
line2    -18'-8.8737", 24'-8.9653", -18'-8.8737", 24'-8.9653" + (RoofSlope * 1")
line2    -18'-8.8737", 24'-8.9653" + (RoofSlope * 1"), -17'-8.8737", 24'-8.9653" + (RoofSlope * 1")
line2    -17'-8.8737", 24'-8.9653" + (RoofSlope * 1"), -18'-8.8737", 24'-8.9653"
define style{2}    "AC_STYLE_1" "Georgia", 8'-1.2222",      0

paragraph		"AC_PRG_3"      2, 0'-0.0000", 0'-0.0000", 0'-0.0000", 2'-3.5591"
    pen     penAttribute_3
    set style "AC_STYLE_1"
        "12"
endparagraph
textblock		"AC_TEXTBLOCK_3" 0'-0.0000",      8, 0'-0.0000", 3'-3.3701", 3'-3.3701", 3'-3.3701", 
        "AC_PRG_3"
richtext2		-18'-3.0084", 25'-8.9653" - (12" - (RoofSlope * 1")), "AC_TEXTBLOCK_3"

paragraph		"AC_PRG_4"      2, 0'-0.0000", 0'-0.0000", 0'-0.0000", 3'-3.3701"
		STR(RoofSlope)	
endparagraph
textblock		"AC_TEXTBLOCK_4" 0'-0.0000",      6, 0'-0.0000", 3'-3.3701", 3'-3.3701", 3'-3.3701", 
        "AC_PRG_4"
richtext2		-18'-8.8737", 25'-3.0683" - ((12" - (RoofSlope * 1")) / 2), "AC_TEXTBLOCK_4"&lt;/PRE&gt;

The problem is in fifth line from the bottom &lt;FONT color="red"&gt;STR(RoofSlope)&lt;/FONT&gt;...Any ideas??</description>
      <pubDate>Wed, 05 Nov 2014 21:59:47 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Converting-integer-numeric-data-to-text-data/m-p/221804#M11677</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-11-05T21:59:47Z</dc:date>
    </item>
    <item>
      <title>Re: Converting integer/numeric data to text data</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Converting-integer-numeric-data-to-text-data/m-p/221805#M11678</link>
      <description>Yes. You are missing parameters.&lt;BR /&gt;
The function is: STR (numeric_expression, length, fractions) or STR (format_string, numeric_expression). All explained in the reference guide.&lt;BR /&gt;
&lt;BR /&gt;
In your case, try something like:&lt;BR /&gt;

&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;STR(RoofSlope,6,2)

&lt;/PRE&gt;

Best regards.</description>
      <pubDate>Wed, 05 Nov 2014 22:16:19 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Converting-integer-numeric-data-to-text-data/m-p/221805#M11678</guid>
      <dc:creator>sinceV6</dc:creator>
      <dc:date>2014-11-05T22:16:19Z</dc:date>
    </item>
    <item>
      <title>Re: Converting integer/numeric data to text data</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Converting-integer-numeric-data-to-text-data/m-p/221806#M11679</link>
      <description>Thank you very much for your help!! It worked like you said. The problem is that I have no knowledge in scripting and although I spent a few hours in reading this quide, most of those symbols still look Chinese to me (I would have say Greek but I'm Greek) &lt;BR /&gt;
 &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_lol.gif" style="display : inline;" /&gt;  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_lol.gif" style="display : inline;" /&gt;  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_lol.gif" style="display : inline;" /&gt;</description>
      <pubDate>Wed, 05 Nov 2014 22:28:29 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Converting-integer-numeric-data-to-text-data/m-p/221806#M11679</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-11-05T22:28:29Z</dc:date>
    </item>
    <item>
      <title>Re: Converting integer/numeric data to text data</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Converting-integer-numeric-data-to-text-data/m-p/221807#M11680</link>
      <description>Glad I could help.&lt;BR /&gt;
&lt;BR /&gt;
At first glance, the guide is not that friendly. It is more technical sort of writing; but once you get how it is structured, it's an invaluable resource (along with the other GDL books out there).&lt;BR /&gt;
&lt;BR /&gt;
Best regards.</description>
      <pubDate>Wed, 05 Nov 2014 23:00:14 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Converting-integer-numeric-data-to-text-data/m-p/221807#M11680</guid>
      <dc:creator>sinceV6</dc:creator>
      <dc:date>2014-11-05T23:00:14Z</dc:date>
    </item>
    <item>
      <title>Re: Converting integer/numeric data to text data</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Converting-integer-numeric-data-to-text-data/m-p/221808#M11681</link>
      <description>Hello again, I was wondering if you could help me a bit more in my attemt to create this Roof Slope Label. What I'm trying to add in the script (and it's going to affect only the text positioning) is this : &lt;BR /&gt;
-If the object is mirrored along the y axis then mirror also the text along it's anchor point (I'm not sure if it keeps the anchor point or I should use one of the hotspots that I have)&lt;BR /&gt;
-If the object is mirrored along the x axis, then do nothing.&lt;BR /&gt;
Probably sounds a very easy command but I've tried so many different things without any luck...  &lt;BR /&gt;
&lt;BR /&gt;
Thanks!!</description>
      <pubDate>Mon, 10 Nov 2014 19:06:05 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Converting-integer-numeric-data-to-text-data/m-p/221808#M11681</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-11-10T19:06:05Z</dc:date>
    </item>
    <item>
      <title>Re: Converting integer/numeric data to text data</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Converting-integer-numeric-data-to-text-data/m-p/221809#M11682</link>
      <description>Hi.&lt;BR /&gt;
Sure thing.&lt;BR /&gt;
It kind of depends how your object is scripted and the parameters you have. A screenshot of the problem and how the object works would help a lot, otherwise is just guessing.&lt;BR /&gt;
&lt;BR /&gt;
I'm assuming you want readable text? Check if the solution I posted here:&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://archicad-talk.graphisoft.com/viewtopic.php?t=47251" target="_blank"&gt;&lt;LINK_TEXT text="http://archicad-talk.graphisoft.com/vie ... hp?t=47251"&gt;http://archicad-talk.graphisoft.com/viewtopic.php?t=47251&lt;/LINK_TEXT&gt;&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
Read the thread and other solutions, and eee if that helps.&lt;BR /&gt;
&lt;BR /&gt;
Best regards.</description>
      <pubDate>Mon, 10 Nov 2014 21:36:23 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Converting-integer-numeric-data-to-text-data/m-p/221809#M11682</guid>
      <dc:creator>sinceV6</dc:creator>
      <dc:date>2014-11-10T21:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: Converting integer/numeric data to text data</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Converting-integer-numeric-data-to-text-data/m-p/221810#M11683</link>
      <description>Once again thanks for your quick responce!! So, here is the code that I have so far :
&lt;PRE&gt;mul2     A/0.474913, B/0.443089
add2     19'-3.5711", -24'-8.9653"
pen     penAttribute_1
hotspot2 -18'-8.8737", 24'-8.9653"
hotspot2 -18'-8.8737", 24'-8.9653" + (RoofSlope * 1")
hotspot2 -17'-8.8737", 24'-8.9653" + (RoofSlope * 1")
hotspot2 -19'-0.2224", 25'-3.0683" - ((12" - (RoofSlope * 1")) / 2)
hotspot2 -18'-3.0084", 25'-11.6875" - (12" - (RoofSlope * 1"))
pen     penAttribute_2
line_property       0
line2    -18'-8.8737", 24'-8.9653", -18'-8.8737", 24'-8.9653" + (RoofSlope * 1")
line2    -18'-8.8737", 24'-8.9653" + (RoofSlope * 1"), -17'-8.8737", 24'-8.9653" + (RoofSlope * 1")
line2    -17'-8.8737", 24'-8.9653" + (RoofSlope * 1"), -18'-8.8737", 24'-8.9653"
define style{2}    "AC_STYLE_1" "Georgia", 8'-1.2222",      0

paragraph		"AC_PRG_3"      2, 0'-0.0000", 0'-0.0000", 0'-0.0000", 2'-3.5591"
    pen     penAttribute_3
    set style "AC_STYLE_1"
        "12"
endparagraph
textblock		"AC_TEXTBLOCK_3" 0'-0.0000",      8, 0'-0.0000", 3'-3.3701", 3'-3.3701", 3'-3.3701", 
        "AC_PRG_3"

add2 -18'-3.0084", 25'-8.9653" - (12" - (RoofSlope * 1"))
viewRotation = 0
rrr = request("View_Rotangle", "", viewRotation)
mul2 1 - 2*symb_mirrored, 1
if symb_rotangle &amp;gt; 91 and symb_rotangle &amp;lt; 271 then
rot2 180
else
rot2 0
endif
richtext2		0, 0, "AC_TEXTBLOCK_3"
del 3

paragraph		"AC_PRG_4"      2, 0'-0.0000", 0'-0.0000", 0'-0.0000", 3'-3.3701"
		STR(RoofSlope,2,0)	
endparagraph
textblock		"AC_TEXTBLOCK_4" 0'-0.0000",      6, 0'-0.0000", 3'-3.3701", 3'-3.3701", 3'-3.3701", 
        "AC_PRG_4"
add2 -18'-8.8737", 25'-3.0683" - ((12" - (RoofSlope * 1")) / 2)
viewRotation = 0
rrr = request("View_Rotangle", "", viewRotation)
if symb_rotangle &amp;gt; 91 and symb_rotangle &amp;lt; 271 then
rot2 180
else
rot2 0
endif
richtext2		0, 0, "AC_TEXTBLOCK_4"
del 3&lt;/PRE&gt;

I've placed also a screenshot that shows the problem when I mirror the object along the x axis.&lt;BR /&gt;
The script that controls the rotation of my text I found it on the net and after some tries that I did it seems to work but only for the mirroring along the y axis.&lt;BR /&gt;
I've tried also to replace it with the code that you sent me 
&lt;PRE&gt;===CORRECT TEXT ORIENTATION===

MUL2 1 - 2 * SYMB_MIRRORED, 1 
ROT2 -SYMB_ROTANGLE * (SYMB_ROTANGLE &amp;lt;&amp;gt; 0)&lt;/PRE&gt;
but I get a message that says "Use of real types can result in precision problems". I clicked "OK" but it didn't work....&lt;BR /&gt;&lt;IMG src="http://community.graphisoft.com/t5/image/serverpage/image-id/67789iE6E618EB1570080B/image-size/large?v=v2&amp;amp;px=999" border="0" alt="Roof Slope Image.jpg" title="Roof Slope Image.jpg" /&gt;</description>
      <pubDate>Mon, 10 Nov 2014 23:09:05 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Converting-integer-numeric-data-to-text-data/m-p/221810#M11683</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-11-10T23:09:05Z</dc:date>
    </item>
    <item>
      <title>Re: Converting integer/numeric data to text data</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Converting-integer-numeric-data-to-text-data/m-p/221811#M11684</link>
      <description>Don't really have time to try it, but I would look into the paragraph and textblock definitions, as textblocks do have an anchor parameter&lt;BR /&gt;

&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;TEXTBLOCK name, width, anchor, angle........
&lt;/PRE&gt;

So that might be the problem when mirroring.&lt;BR /&gt;
&lt;BR /&gt;
It looks like you saved this from the floor plan as an object, right? It would work OK with the original code, but when trying to make it parametric, you need to review the whole thing.&lt;BR /&gt;
&lt;BR /&gt;
For simple texts like these, I would ditch the paragraph/textblock/richtext scenario, unless you need the options they provide, and use simple TEXT2 commands.</description>
      <pubDate>Tue, 11 Nov 2014 01:03:21 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Converting-integer-numeric-data-to-text-data/m-p/221811#M11684</guid>
      <dc:creator>sinceV6</dc:creator>
      <dc:date>2014-11-11T01:03:21Z</dc:date>
    </item>
    <item>
      <title>Re: Converting integer/numeric data to text data</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Converting-integer-numeric-data-to-text-data/m-p/221812#M11685</link>
      <description>Like you said, I draw it in floor plan view and I saved it as an object. Archicad automatically created that type of code. I started playing with the code only when I realized my extra needs... I did a lot of search  in the net looking for instructions and examples and  also to the GDL guide, but at 80% all I do is guessing and trying....  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_smile.gif" style="display : inline;" /&gt;</description>
      <pubDate>Tue, 11 Nov 2014 15:55:50 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Converting-integer-numeric-data-to-text-data/m-p/221812#M11685</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-11-11T15:55:50Z</dc:date>
    </item>
  </channel>
</rss>

