<?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: Text treatment in GDL in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/Text-treatment-in-GDL/m-p/34753#M39495</link>
    <description>&lt;BLOCKQUOTE&gt;Matthew wrote:&lt;BR /&gt;Sorry, I forgot one important thing...&lt;/BLOCKQUOTE&gt; &lt;BR /&gt;
Okay, much better now. Thank you very much... &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_smile.gif" style="display : inline;" /&gt; 
&lt;BLOCKQUOTE&gt;I honestly don't understand what you are trying to accomplish with the code you posted. It looks a bit complicated if all you are trying to do is place multiple lines of text.&lt;/BLOCKQUOTE&gt; &lt;BR /&gt;
I was actually trying to create some blocks (switch, outlet, etc) that would need to have different parameters show up (height AFF, dimmer, 3W, etc). Sometimes you need to have more than one option showing, hence the need for a second line. Now if only I could figure out a way of having the option to position the hotlinks (and associated text) individually for all... Any ideas here? &lt;BR /&gt;
 &lt;BR /&gt;
As for the code, I'm not generally known for creating very clean code. &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_redface.gif" style="display : inline;" /&gt; It usually works, but at what price...  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_wink.gif" style="display : inline;" /&gt;</description>
    <pubDate>Fri, 08 Oct 2004 03:12:14 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2004-10-08T03:12:14Z</dc:date>
    <item>
      <title>Text treatment in GDL</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Text-treatment-in-GDL/m-p/34747#M39489</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;(I thought I saw something regarding this, but I just can't find it. It if's been discussed, just point me in the right direction.)&lt;BR /&gt;
&lt;BR /&gt;
I'm trying to create a block with multiple lines of text, and I wouldn't always need all the lines of text to show all the time. One option that I thought I saw here, was to move the second line of text down by the height of the text (i.e.: if the text is 5mm high, the second line would start 6mm below it). I just can't remember how you can pull (REQUEST?) that information out.&lt;BR /&gt;
&lt;BR /&gt;
Alternately, is there a line-feed option that I'm not aware of?&lt;BR /&gt;
&lt;BR /&gt;
Thanx&lt;/T&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 07 Oct 2004 17:45:05 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Text-treatment-in-GDL/m-p/34747#M39489</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2004-10-07T17:45:05Z</dc:date>
    </item>
    <item>
      <title>Re: Text treatment in GDL</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Text-treatment-in-GDL/m-p/34748#M39490</link>
      <description>The text height is in your style definition. I often use a variable for this like text_sz so I can call it later in situations like yours.&lt;BR /&gt;
&lt;BR /&gt;
There is no linefeed function. You have to insert lines of text with separate TEXT2 statements. I have set up parts to word wrap to a variable column width, but this requires parsing the strings and assigning each line of text to a separate variable. This is not a job for the faint of heart or short of time.</description>
      <pubDate>Thu, 07 Oct 2004 19:37:42 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Text-treatment-in-GDL/m-p/34748#M39490</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2004-10-07T19:37:42Z</dc:date>
    </item>
    <item>
      <title>Re: Text treatment in GDL</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Text-treatment-in-GDL/m-p/34749#M39491</link>
      <description>I also use a text size variable, however, how would you figure out where to place the next line of text? For example:&lt;BR /&gt;

&lt;PRE&gt;text_size = 5 !-- this is usually in mm, right?
TEXT 0", 0", "first line of text here"
TEXT 0", Y, "second line of text here"
&lt;/PRE&gt;

How would you figure out what 'Y' should be if you're working in the english system? You can't just do &lt;B&gt;&lt;I&gt;&lt;/I&gt;&lt;/B&gt;&lt;S&gt;&lt;B&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/B&gt;&lt;/S&gt;Y = 0-text_size&lt;E&gt;&lt;/E&gt;, can you?</description>
      <pubDate>Thu, 07 Oct 2004 22:02:01 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Text-treatment-in-GDL/m-p/34749#M39491</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2004-10-07T22:02:01Z</dc:date>
    </item>
    <item>
      <title>Re: Text treatment in GDL</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Text-treatment-in-GDL/m-p/34750#M39492</link>
      <description>&lt;BLOCKQUOTE&gt;Sergio wrote:&lt;BR /&gt;I also use a text size variable, however, how would you figure out where to place the next line of text? For example:&lt;BR /&gt;

&lt;PRE&gt;text_size = 5 !-- this is usually in mm, right?
TEXT 0", 0", "first line of text here"
TEXT 0", Y, "second line of text here"
&lt;/PRE&gt;

How would you figure out what 'Y' should be if you're working in the english system? You can't just do &lt;B&gt;&lt;I&gt;&lt;/I&gt;&lt;/B&gt;&lt;S&gt;&lt;B&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/B&gt;&lt;/S&gt;Y = 0-text_size&lt;E&gt;&lt;/E&gt;, can you?&lt;/BLOCKQUOTE&gt;

Sure. An example:&lt;BR /&gt;

&lt;PRE&gt;text_sz   = 8 * 0.3528                         ! conversion from points to mm

DEFINE STYLE "text_style" "Arial", text_sz, 1, 0

STYLE text_style

TEXT2 0, 0, "First line of text"                ! or a variable parameter
TEXT2 0, -text_sz*1.25, "Second line of text"   ! or whatever 
&lt;/PRE&gt;</description>
      <pubDate>Thu, 07 Oct 2004 22:15:20 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Text-treatment-in-GDL/m-p/34750#M39492</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2004-10-07T22:15:20Z</dc:date>
    </item>
    <item>
      <title>Re: Text treatment in GDL</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Text-treatment-in-GDL/m-p/34751#M39493</link>
      <description>Huh? Did I mention I'm on the english system (the one with feet and inches)? &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_smile.gif" style="display : inline;" /&gt; I just tried your solution, and I'm still getting some weird spacing. My temporary solution is like so: 
&lt;PRE&gt;t_lines=0
t_conv=0.08
a2 = a

IF s_dim = 1 THEN !--- show Dimmer ---
	dim_a = a2: dim_b = b+(t_lines*t_size*t_conv)
	hotspot2 dim_a, dim_b, 2	!drag text to location
	TEXT2 dim_a, dim_b, 'D'
	t_lines = t_lines +1
ENDIF&lt;/PRE&gt;
I'll probably take another look at it some other time... unless you have some other ideas. Maybe I'm just not seeing it (wouldn't be the first time).</description>
      <pubDate>Thu, 07 Oct 2004 23:37:37 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Text-treatment-in-GDL/m-p/34751#M39493</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2004-10-07T23:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: Text treatment in GDL</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Text-treatment-in-GDL/m-p/34752#M39494</link>
      <description>Sorry, I forgot one important thing. The text size is mm in paper space but the TEXT2 position parameters assume meters in model space (like all of GDL internally), so the line should read:&lt;BR /&gt;

&lt;PRE&gt;TEXT2 0, -text_sz*A_*0.00125, "Second line of text"&lt;/PRE&gt;

When you say you are using imperial/english/american, I am assuming that means you are using point sizes for type.&lt;BR /&gt;
&lt;BR /&gt;
In any case, GDL is all metric internally but you can always put in the arithmetic to do the conversion. When you type in the foot-inch format in GDL scripts it is converted for you.&lt;BR /&gt;
&lt;BR /&gt;
I honestly don't understand what you are trying to accomplish with the code you posted. It looks a bit complicated if all you are trying to do is place multiple lines of text.</description>
      <pubDate>Fri, 08 Oct 2004 02:14:54 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Text-treatment-in-GDL/m-p/34752#M39494</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2004-10-08T02:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: Text treatment in GDL</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Text-treatment-in-GDL/m-p/34753#M39495</link>
      <description>&lt;BLOCKQUOTE&gt;Matthew wrote:&lt;BR /&gt;Sorry, I forgot one important thing...&lt;/BLOCKQUOTE&gt; &lt;BR /&gt;
Okay, much better now. Thank you very much... &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_smile.gif" style="display : inline;" /&gt; 
&lt;BLOCKQUOTE&gt;I honestly don't understand what you are trying to accomplish with the code you posted. It looks a bit complicated if all you are trying to do is place multiple lines of text.&lt;/BLOCKQUOTE&gt; &lt;BR /&gt;
I was actually trying to create some blocks (switch, outlet, etc) that would need to have different parameters show up (height AFF, dimmer, 3W, etc). Sometimes you need to have more than one option showing, hence the need for a second line. Now if only I could figure out a way of having the option to position the hotlinks (and associated text) individually for all... Any ideas here? &lt;BR /&gt;
 &lt;BR /&gt;
As for the code, I'm not generally known for creating very clean code. &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_redface.gif" style="display : inline;" /&gt; It usually works, but at what price...  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_wink.gif" style="display : inline;" /&gt;</description>
      <pubDate>Fri, 08 Oct 2004 03:12:14 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Text-treatment-in-GDL/m-p/34753#M39495</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2004-10-08T03:12:14Z</dc:date>
    </item>
    <item>
      <title>Re: Text treatment in GDL</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Text-treatment-in-GDL/m-p/34754#M39496</link>
      <description>&lt;BLOCKQUOTE&gt;Matthew wrote:&lt;BR /&gt;There is no linefeed function. You have to insert lines of text with separate TEXT2 statements. &lt;/BLOCKQUOTE&gt;

Matthew, you will be pleased to know you are incorrect&lt;BR /&gt;
&lt;BR /&gt;
use +"\n" to make a new line of text&lt;BR /&gt;
&lt;BR /&gt;
Example: &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;text2 L,H,"max width "+x+" m"&lt;FONT color="red"&gt;+"\n"&lt;/FONT&gt;+"max depth "+y+" m"&lt;FONT color="red"&gt;+"\n"&lt;/FONT&gt;+area+" sq m"&lt;E&gt;&lt;/E&gt;</description>
      <pubDate>Fri, 08 Oct 2004 04:49:02 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Text-treatment-in-GDL/m-p/34754#M39496</guid>
      <dc:creator>Aussie John</dc:creator>
      <dc:date>2004-10-08T04:49:02Z</dc:date>
    </item>
    <item>
      <title>Re: Text treatment in GDL</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Text-treatment-in-GDL/m-p/34755#M39497</link>
      <description>&lt;BLOCKQUOTE&gt;Aussie wrote:&lt;BR /&gt;&lt;BLOCKQUOTE&gt;Matthew wrote:&lt;BR /&gt;There is no linefeed function. You have to insert lines of text with separate TEXT2 statements. &lt;/BLOCKQUOTE&gt;

Matthew, you will be pleased to know you are incorrect&lt;BR /&gt;
&lt;BR /&gt;
use +"\n" to make a new line of text&lt;BR /&gt;
&lt;BR /&gt;
Example: &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;text2 L,H,"max width "+x+" m"&lt;FONT color="red"&gt;+"\n"&lt;/FONT&gt;+"max depth "+y+" m"&lt;FONT color="red"&gt;+"\n"&lt;/FONT&gt;+area+" sq m"&lt;E&gt;&lt;/E&gt;&lt;/BLOCKQUOTE&gt;

Cool. Thanks.</description>
      <pubDate>Fri, 08 Oct 2004 07:40:38 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Text-treatment-in-GDL/m-p/34755#M39497</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2004-10-08T07:40:38Z</dc:date>
    </item>
  </channel>
</rss>

