<?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: Word wrapping in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/Word-wrapping/m-p/4354#M42425</link>
    <description>Wich ArchiCAD Version? From AC8+ you should use RICHTEXT2.&lt;BR /&gt;
&lt;BR /&gt;
There is no command to search the second instance of a character inside a string. You have to devide it for the second search:&lt;BR /&gt;
&lt;BR /&gt;
n = STRSTR (string, " ")&lt;BR /&gt;
n2 = n+ STRSTR (STRSUB(string,n+1,len-n), " ")</description>
    <pubDate>Wed, 02 Aug 2006 06:19:36 GMT</pubDate>
    <dc:creator>Frank Beister</dc:creator>
    <dc:date>2006-08-02T06:19:36Z</dc:date>
    <item>
      <title>Word wrapping</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Word-wrapping/m-p/4350#M42421</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;Hi - I am wondering how to implement good word wrapping in a text string with a proportional rather than fixed width font?&lt;BR /&gt;
&lt;BR /&gt;
Cheers&lt;/T&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 11 Dec 2003 08:11:09 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Word-wrapping/m-p/4350#M42421</guid>
      <dc:creator>Paul King</dc:creator>
      <dc:date>2003-12-11T08:11:09Z</dc:date>
    </item>
    <item>
      <title>Re: Word wrapping</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Word-wrapping/m-p/4351#M42422</link>
      <description>Paul&lt;BR /&gt;
&lt;BR /&gt;
I have used the STW() command to do word wrapping:&lt;BR /&gt;
&lt;BR /&gt;
As each word is chopped off the main text string one at a time it is then added to the string for the current line.&lt;BR /&gt;
&lt;BR /&gt;
The words are found by hunting for the first space in the main text string;&lt;BR /&gt;
&lt;BR /&gt;
word_length = strstr(input_line," ")&lt;BR /&gt;
let current_line = current_line + strsub(input_line,0,word_length)&lt;BR /&gt;
&lt;BR /&gt;
The actual placed width of the current line string is checked with the STW() command (which allows for the current font)&lt;BR /&gt;
&lt;BR /&gt;
STW(current_line)/1000*GLOB_SCALE &amp;lt;= line_width &lt;BR /&gt;
&lt;BR /&gt;
When the width is exceeded the script then has to go back a step to place the string without the extra word and then carries on with the next line....&lt;BR /&gt;
&lt;BR /&gt;
One extra note, as variables in GDL are limited to 256 characters that is the maximum single line length that you can process and wrap, effectively limiting the length a paragraph.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
hope this give you some ideas&lt;BR /&gt;
&lt;BR /&gt;
regards</description>
      <pubDate>Thu, 11 Dec 2003 20:14:09 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Word-wrapping/m-p/4351#M42422</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-12-11T20:14:09Z</dc:date>
    </item>
    <item>
      <title>Re: Word wrapping</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Word-wrapping/m-p/4352#M42423</link>
      <description>Hi Bill - thanks for that - I stumbled on the STW() command late last night  &amp;amp; figured it would be the way to go. Good to get your tips on algorythm for wrapping.&lt;BR /&gt;
&lt;BR /&gt;
BTW, have otherwise created that auto text note object I mentioned to you the other day - and it does works with calculate menu when placed in plan or section!&lt;BR /&gt;
Am going to use the new hotspot feature to set dynamic note text wrapping now.  Good fun!&lt;BR /&gt;
&lt;BR /&gt;
One more question to do with calulate menu:&lt;BR /&gt;
&lt;BR /&gt;
How to you generate a list with word wrapping enabled in a feild (I can definitlly do that much) AND have dynamic display feild height to suit of rows generated as a result of wrapping&lt;BR /&gt;
- ie avoiding unnecesary white space in list?&lt;BR /&gt;
&lt;BR /&gt;
Failing that, is there a way a library part can detect and count &amp;amp; list other library parts in a view or selection set ?&lt;BR /&gt;
&lt;BR /&gt;
Can the Calculate menu be used to do the detecting &amp;amp; counting, and sent the result back to a placed library part for listing?&lt;BR /&gt;
&lt;BR /&gt;
Cheers</description>
      <pubDate>Thu, 11 Dec 2003 22:24:05 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Word-wrapping/m-p/4352#M42423</guid>
      <dc:creator>Paul King</dc:creator>
      <dc:date>2003-12-11T22:24:05Z</dc:date>
    </item>
    <item>
      <title>Re: Word wrapping</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Word-wrapping/m-p/4353#M42424</link>
      <description>I found this and I am struggling a little.  I want to add the ability for the user to select which break puts the text on the 2nd line.&lt;BR /&gt;
&lt;BR /&gt;
string = "A/V SYSTEM VIDEO"&lt;BR /&gt;
len = STRLEN (string)&lt;BR /&gt;
n = STRSTR (string, " ")&lt;BR /&gt;
n2 = STRSTR (string, " ")&lt;BR /&gt;
TEXT2 0, -1, STRSUB (string, 1, n2 - 1)&lt;BR /&gt;
TEXT2 0, -2, STRSUB (string, n2 + 1, len)&lt;BR /&gt;
&lt;BR /&gt;
Prints "AV"&lt;BR /&gt;
         "SYSTEM VIDEO"&lt;BR /&gt;
&lt;BR /&gt;
I want the option to choose between that and&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
         "AV SYSTEM"&lt;BR /&gt;
         "Video"&lt;BR /&gt;
&lt;BR /&gt;
Also was wondering if you could use the STW command with hot spots to make a box that acts like the text tool&lt;BR /&gt;
&lt;BR /&gt;
Thanks</description>
      <pubDate>Tue, 01 Aug 2006 21:05:03 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Word-wrapping/m-p/4353#M42424</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-08-01T21:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: Word wrapping</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Word-wrapping/m-p/4354#M42425</link>
      <description>Wich ArchiCAD Version? From AC8+ you should use RICHTEXT2.&lt;BR /&gt;
&lt;BR /&gt;
There is no command to search the second instance of a character inside a string. You have to devide it for the second search:&lt;BR /&gt;
&lt;BR /&gt;
n = STRSTR (string, " ")&lt;BR /&gt;
n2 = n+ STRSTR (STRSUB(string,n+1,len-n), " ")</description>
      <pubDate>Wed, 02 Aug 2006 06:19:36 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Word-wrapping/m-p/4354#M42425</guid>
      <dc:creator>Frank Beister</dc:creator>
      <dc:date>2006-08-02T06:19:36Z</dc:date>
    </item>
  </channel>
</rss>

