<?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: Room Label - Can't get Paragraph/Textblock to work prope in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/Room-Label-Can-t-get-Paragraph-Textblock-to-work-properly/m-p/191829#M23908</link>
    <description>Just looked at your script - I probably should have done that first!&lt;BR /&gt;
&lt;BR /&gt;
You need to put quotes in front of the roomname variable when you use a variable for the paragraph text.&lt;BR /&gt;
&lt;BR /&gt;
i.e.&lt;BR /&gt;
&lt;BR /&gt;
&lt;FONT color="#ff0012"&gt;"" + roomname&lt;/FONT&gt;&lt;BR /&gt;
&lt;BR /&gt;
If you don't add the quotes then it is not recognised as text string.&lt;BR /&gt;
As you found if you add your own static text (i.e. "LOUNGE ROOM" then it will work.&lt;BR /&gt;
&lt;BR /&gt;
Thanks to who ever it was that mentioned it somewhere here on the forum before.&lt;BR /&gt;
Barry.</description>
    <pubDate>Fri, 18 Sep 2009 06:02:32 GMT</pubDate>
    <dc:creator>Barry Kelly</dc:creator>
    <dc:date>2009-09-18T06:02:32Z</dc:date>
    <item>
      <title>Room Label - Can't get Paragraph/Textblock to work properly</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Room-Label-Can-t-get-Paragraph-Textblock-to-work-properly/m-p/191826#M23905</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;R&gt;Hi all,&lt;BR /&gt;
&lt;BR /&gt;
I'm at my wit's end. I feel like I've tried everything. Please Help!&lt;BR /&gt;
&lt;BR /&gt;
What I'm trying to create is a room label based on one that I found here in the Depository, by James Murray (called Shape Tag JM9). I want a piece of Centered Text over an elliptical room tag (client demands ellipses), with the option to have a text size for the Room Name, and a different one for the room number. &lt;BR /&gt;
&lt;BR /&gt;
It seems to me that the only way to get nicely centered/broken text is with a TEXTBLOCK (so that the user can define the width and get their own desired linebreak... I find \n too clumsy for my users who aren't familiar enough with the program), and the only way to use a TEXTBLOCK is with a PARAGRAPH command. This seems to, in effect, negate any style commands, and I cannot get set/define style{2} to work. They only work if I am using static text, not a variable. The text always seems to go to a system default font/size. Has anyone run into this before? &lt;BR /&gt;
&lt;BR /&gt;
See the attached object to see what I'm describing. Any help at all would be FANTASTIC... I've lost too much time over this already &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_sad.gif" style="display : inline;" /&gt;    Will I need to resort to \n for breaks and abandon the textblock altogether?&lt;/R&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 18 Sep 2009 04:56:57 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Room-Label-Can-t-get-Paragraph-Textblock-to-work-properly/m-p/191826#M23905</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-09-18T04:56:57Z</dc:date>
    </item>
    <item>
      <title>Re: Room Label - Can't get Paragraph/Textblock to work prope</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Room-Label-Can-t-get-Paragraph-Textblock-to-work-properly/m-p/191827#M23906</link>
      <description>Just an update:&lt;BR /&gt;
&lt;BR /&gt;
If I take "room_name" in the 2D script and replace it with something like glob_id, or regular text (or even the variable name with quotes around it), everything works perfectly. if it's the variable room_name, however, it does not. the attached file is nearly perfect except for the fact that I can't get user-entered text into the label with the user-defined font. &lt;BR /&gt;
&lt;BR /&gt;
ARGH!</description>
      <pubDate>Fri, 18 Sep 2009 05:42:18 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Room-Label-Can-t-get-Paragraph-Textblock-to-work-properly/m-p/191827#M23906</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-09-18T05:42:18Z</dc:date>
    </item>
    <item>
      <title>Re: Room Label - Can't get Paragraph/Textblock to work prope</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Room-Label-Can-t-get-Paragraph-Textblock-to-work-properly/m-p/191828#M23907</link>
      <description>You define your text styles as normal.&lt;BR /&gt;
&lt;BR /&gt;
Then you need to define the paragraph where you can set the text styles for the various bits of text and add the text content.&lt;BR /&gt;
&lt;BR /&gt;
Now include the paragraph in a text block which is where you can set the size (width) of the text block - either as a user variable which can be linked to a stretchy hotspot (which is what I was using in my example below) or you can enquire the length of you text string and set it to that.&lt;BR /&gt;
&lt;BR /&gt;
Finaly then you place the text block with the richtext command.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
I haven't looked at your script (yet) but here is part of an object I did that is all stretchy.&lt;BR /&gt;
&lt;BR /&gt;
&lt;FONT color="#ff0000"&gt;!Define a paragraph&lt;BR /&gt;
	paragraph "note_1" 1,&lt;BR /&gt;
		0, left_indent, 0,&lt;BR /&gt;
		1,&lt;BR /&gt;
		tab_1&lt;BR /&gt;
&lt;BR /&gt;
	SET STYLE "BULLET"&lt;BR /&gt;
		"" + bullet_text&lt;BR /&gt;
&lt;BR /&gt;
	SET STYLE "TEXT"&lt;BR /&gt;
		"\t" + stringval_1&lt;BR /&gt;
	endParagraph&lt;BR /&gt;
&lt;BR /&gt;
!Include the paragraph in a text block&lt;BR /&gt;
!print (box_wid*10*(100/A_))&lt;BR /&gt;
!print (box_wid*1000/A_)&lt;BR /&gt;
!	textBlock "text_block_1" (box_wid*10*(100/A_))-(2*bullet_swch),&lt;BR /&gt;
	textBlock "text_block_1" (box_wid*1000/A_)-(2*bullet_swch),&lt;BR /&gt;
		1, 0,&lt;BR /&gt;
		1, 1, 1,&lt;BR /&gt;
		"note_1"&lt;BR /&gt;
&lt;BR /&gt;
	rrr = REQUEST("Textblock_Info", "text_block_1", textblockwidth, textblockheight)&lt;BR /&gt;
	box_hgt = box_hgt + textblockheight*(A_/1000)+linespace*0.4&lt;BR /&gt;
&lt;BR /&gt;
!Place the block using the richtext2 command&lt;BR /&gt;
	richText2 0, 0, "text_block_1"&lt;BR /&gt;
	ADD2 0, -textblockheight*(A_/1000)-linespace*0.4&lt;/FONT&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
This is the script for the first bulleted note in the attached image.&lt;BR /&gt;
Barry.&lt;BR /&gt;&lt;IMG src="https://community.graphisoft.com/t5/image/serverpage/image-id/13828iD123EA8916D5CB31/image-size/large?v=v2&amp;amp;px=999" border="0" alt="note.jpg" title="note.jpg" /&gt;</description>
      <pubDate>Fri, 18 Sep 2009 05:48:19 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Room-Label-Can-t-get-Paragraph-Textblock-to-work-properly/m-p/191828#M23907</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2009-09-18T05:48:19Z</dc:date>
    </item>
    <item>
      <title>Re: Room Label - Can't get Paragraph/Textblock to work prope</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Room-Label-Can-t-get-Paragraph-Textblock-to-work-properly/m-p/191829#M23908</link>
      <description>Just looked at your script - I probably should have done that first!&lt;BR /&gt;
&lt;BR /&gt;
You need to put quotes in front of the roomname variable when you use a variable for the paragraph text.&lt;BR /&gt;
&lt;BR /&gt;
i.e.&lt;BR /&gt;
&lt;BR /&gt;
&lt;FONT color="#ff0012"&gt;"" + roomname&lt;/FONT&gt;&lt;BR /&gt;
&lt;BR /&gt;
If you don't add the quotes then it is not recognised as text string.&lt;BR /&gt;
As you found if you add your own static text (i.e. "LOUNGE ROOM" then it will work.&lt;BR /&gt;
&lt;BR /&gt;
Thanks to who ever it was that mentioned it somewhere here on the forum before.&lt;BR /&gt;
Barry.</description>
      <pubDate>Fri, 18 Sep 2009 06:02:32 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Room-Label-Can-t-get-Paragraph-Textblock-to-work-properly/m-p/191829#M23908</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2009-09-18T06:02:32Z</dc:date>
    </item>
    <item>
      <title>Re: Room Label - Can't get Paragraph/Textblock to work prope</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Room-Label-Can-t-get-Paragraph-Textblock-to-work-properly/m-p/191830#M23909</link>
      <description>&lt;BLOCKQUOTE&gt;Barry wrote:&lt;BR /&gt;Just looked at your script - I probably should have done that first!&lt;BR /&gt;
&lt;BR /&gt;
You need to put quotes in front of the roomname variable when you use a variable for the paragraph text.&lt;BR /&gt;
&lt;BR /&gt;
i.e.&lt;BR /&gt;
&lt;BR /&gt;
&lt;FONT color="#ff0012"&gt;"" + roomname&lt;/FONT&gt;&lt;BR /&gt;
&lt;BR /&gt;
If you don't add the quotes then it is not recognised as text string.&lt;BR /&gt;
As you found if you add your own static text (i.e. "LOUNGE ROOM" then it will work.&lt;BR /&gt;
&lt;BR /&gt;
Thanks to who ever it was that mentioned it somewhere here on the forum before.&lt;BR /&gt;
Barry.&lt;/BLOCKQUOTE&gt;

Wow - brilliant! Can't believe it was so simple. That'll teach me to dive into GDL headfirst knowing nothing about it &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_smile.gif" style="display : inline;" /&gt;&lt;BR /&gt;
&lt;BR /&gt;
I got the attached object working perfectly... is there any way to configure it so that it breaks lines according to words, like a textbox does? &lt;BR /&gt;
And do you know how I might go about getting the variables to show&lt;BR /&gt;
 up in the Info Box, so that my users don't have to open the object and edit it just to change the room name?</description>
      <pubDate>Fri, 18 Sep 2009 06:20:38 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Room-Label-Can-t-get-Paragraph-Textblock-to-work-properly/m-p/191830#M23909</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-09-18T06:20:38Z</dc:date>
    </item>
    <item>
      <title>Re: Room Label - Can't get Paragraph/Textblock to work prope</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Room-Label-Can-t-get-Paragraph-Textblock-to-work-properly/m-p/191831#M23910</link>
      <description>It will wrap the words unless the width you specify is too short and then it will have to break the word down as well.&lt;BR /&gt;
What you have works just fine as you adjust the width.&lt;BR /&gt;
You have set the width base on the "A" variable (A__=A*1000).&lt;BR /&gt;
The default for "A" in your script is 1000 mm so the default width of you object text is 1,000,000 mm.&lt;BR /&gt;
&lt;BR /&gt;
As you adjust the width of the object in the info box then all is good (as in the image below - width set to 80, 60 &amp;amp; 20).&lt;BR /&gt;
&lt;BR /&gt;
As for the variables in the info box that is not possible unfortunately.&lt;BR /&gt;
The only text variable you can use in the info box is the ID which you are already using any way.&lt;BR /&gt;
&lt;BR /&gt;
Barry.</description>
      <pubDate>Fri, 18 Sep 2009 06:47:03 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Room-Label-Can-t-get-Paragraph-Textblock-to-work-properly/m-p/191831#M23910</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2009-09-18T06:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: Room Label - Can't get Paragraph/Textblock to work properly</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Room-Label-Can-t-get-Paragraph-Textblock-to-work-properly/m-p/191832#M23911</link>
      <description>&lt;BLOCKQUOTE&gt;Barry wrote:&lt;BR /&gt;It will wrap the words unless the width you specify is too short and then it will have to break the word down as well.&lt;BR /&gt;
What you have works just fine as you adjust the width.&lt;BR /&gt;
You have set the width base on the "A" variable (A__=A*1000).&lt;BR /&gt;
The default for "A" in your script is 1000 mm so the default width of you object text is 1,000,000 mm.&lt;BR /&gt;
&lt;BR /&gt;
As you adjust the width of the object in the info box then all is good (as in the image below - width set to 80, 60 &amp;amp; 20).&lt;BR /&gt;
&lt;BR /&gt;
As for the variables in the info box that is not possible unfortunately.&lt;BR /&gt;
The only text variable you can use in the info box is the ID which you are already using any way.&lt;BR /&gt;
&lt;BR /&gt;
Barry.&lt;/BLOCKQUOTE&gt;

Hi Barry,&lt;BR /&gt;
&lt;BR /&gt;
Thanks for all your help so far! The width issue is really troubling me. The reason I made the *1000 thing was because of the attached image. Despite my blockwidth being defined as "A", and despite the fact that in this image A is 7200, the text is not really filling the outline of the box that it should be. Any idea what's up?&lt;BR /&gt;
&lt;BR /&gt;
For what it's worth, I would *love* to be able to define A by dragging the hotspots, is there any way to accomplish this?&lt;BR /&gt;&lt;IMG src="http://community.graphisoft.com/t5/image/serverpage/image-id/68332iE24515F5406E2F07/image-size/large?v=v2&amp;amp;px=999" border="0" alt="roomtag_width.jpg" title="roomtag_width.jpg" /&gt;</description>
      <pubDate>Fri, 18 Sep 2009 13:35:18 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Room-Label-Can-t-get-Paragraph-Textblock-to-work-properly/m-p/191832#M23911</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-09-18T13:35:18Z</dc:date>
    </item>
    <item>
      <title>Re: Room Label - Can't get Paragraph/Textblock to work prope</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Room-Label-Can-t-get-Paragraph-Textblock-to-work-properly/m-p/191833#M23912</link>
      <description>here's the latest object which generated the image above</description>
      <pubDate>Fri, 18 Sep 2009 13:38:35 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Room-Label-Can-t-get-Paragraph-Textblock-to-work-properly/m-p/191833#M23912</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-09-18T13:38:35Z</dc:date>
    </item>
    <item>
      <title>Re: Room Label - Can't get Paragraph/Textblock to work prope</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Room-Label-Can-t-get-Paragraph-Textblock-to-work-properly/m-p/191834#M23913</link>
      <description>Guitarchitect,&lt;BR /&gt;
Sorry I haven't been around recently to reply.&lt;BR /&gt;
&lt;BR /&gt;
Firstly the paragrah line in the 2D script needs amending.&lt;BR /&gt;
&lt;BR /&gt;
paragraph		"roompg"      2,            0,            0,            0,            &lt;FONT color="#ff0000"&gt;1&lt;/FONT&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
There is something funny with the "blockwidth" variable - it seems to be getting reduced by a factor of 10 for the text but is OK for the hotspots.&lt;BR /&gt;
That is why the hotspots are wider than the text.&lt;BR /&gt;
&lt;BR /&gt;
I haven't had time to look into it too deeply and I won't have for the next week or so (sorry).&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
The object is already stretchy as the hotspots are based on the "A" width.&lt;BR /&gt;
Or you could add in a moveable (stretchy) hotspot based on a "blockwidth" parameter which you could add into the parameter list (remove from the master script where you have the "blockwidth = A" so then it is independent of A.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
If I can I will try to have a better look at it but it won't be in the next week - I am actually going to take a few days off!&lt;BR /&gt;
Maybe someone else may have a look at it in the mean time.&lt;BR /&gt;
Barry.</description>
      <pubDate>Thu, 24 Sep 2009 07:48:28 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Room-Label-Can-t-get-Paragraph-Textblock-to-work-properly/m-p/191834#M23913</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2009-09-24T07:48:28Z</dc:date>
    </item>
    <item>
      <title>Re: Room Label - Can't get Paragraph/Textblock to work prope</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Room-Label-Can-t-get-Paragraph-Textblock-to-work-properly/m-p/191835#M23914</link>
      <description>&lt;BLOCKQUOTE&gt;guitarchitect wrote:&lt;BR /&gt;...That'll teach me to dive into GDL headfirst knowing nothing about it &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_smile.gif" style="display : inline;" /&gt;.&lt;/BLOCKQUOTE&gt;

IMHO it's the best way to learn.</description>
      <pubDate>Fri, 25 Sep 2009 00:32:42 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Room-Label-Can-t-get-Paragraph-Textblock-to-work-properly/m-p/191835#M23914</guid>
      <dc:creator>andrewzarb</dc:creator>
      <dc:date>2009-09-25T00:32:42Z</dc:date>
    </item>
    <item>
      <title>Re: Room Label - Can't get Paragraph/Textblock to work prope</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Room-Label-Can-t-get-Paragraph-Textblock-to-work-properly/m-p/191836#M23915</link>
      <description>I had a quick play with it last night.&lt;BR /&gt;
I couldn't disappear without having a better look.&lt;BR /&gt;
Just adjusted the size of the text block x 10 and made the hotspots relate to the length (A parameter) so it is stretchy in plan.&lt;BR /&gt;
I didn't use graphical hotsopts as there was no need.&lt;BR /&gt;
Barry.&lt;BR /&gt;
PS this was based on one of the ealier attatchments - RoomLable_again - as that is all I had - but I think they are very similar).</description>
      <pubDate>Fri, 25 Sep 2009 02:25:02 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Room-Label-Can-t-get-Paragraph-Textblock-to-work-properly/m-p/191836#M23915</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2009-09-25T02:25:02Z</dc:date>
    </item>
  </channel>
</rss>

