<?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 2DScript error with GDL DATA INPUT variable inside PARAGRAPH in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/2DScript-error-with-GDL-DATA-INPUT-variable-inside-PARAGRAPH/m-p/68912#M28714</link>
    <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;R&gt;I have created a label that will show flat name(via "Zone_relations" where zone number is flat name, though ID would be more suitable in this case but it's the limitation of the "Zone_relations" request), area etc and this is obtained through GDL DATA I/O ADD-ON by INPUT command that queries the database based on the key value. &lt;BR /&gt;
&lt;BR /&gt;
1) The problem lies with one DATA INPUT variable (nr_rooms) that causes 2D Script error inside paragraph. At the same time there is another exactly identical input variable(unit_area) just from another channel/file and it works just fine. With print or TEXT2 command the problematic variable gives correct feedback but not when inside the paragraph. This is my first script so I assume it's something simple that I'm not aware of.&lt;BR /&gt;
&lt;BR /&gt;
Master script:
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;rr1 = REQUEST ("Zone_relations", "", category_name, code, z_name, z_number)

identify = ""

key=z_number
ch1 = OPEN ("DATA", "KRT.txt", "SEPARATOR = '\t', MODE = RO, LIBRARY ")
ch2 = OPEN ("DATA", "KRT-toad.txt", "SEPARATOR = '\t', MODE = RO, LIBRARY ")
n = INPUT (ch1, key, 1, unit_area)
	if n &amp;lt;&amp;gt; 0 then
		identify = z_number
	else
		identify = Unit_ID
		key = Unit_ID
		n = INPUT (ch1, key, 1, unit_area)
	EndIF
nr = INPUT (ch2, key, 1, nr_rooms)
close ch1
close ch2
&lt;/PRE&gt;

2D Script:
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;Font=LABEL_FONT_NAME
Font_size=fsize
Font_style=Detail_font_style
alignment=LABEL_TEXT_ALIGN
firstline_indent=0
left_indent=0
right_indent=0
line_spacing=LABEL_TEXT_LEADING

textblock_width=0
textblock_anchor=1
textblock_angel=0
textblock_width_factor=LABEL_TEXT_WIDTH_FACT
textblock_charspace_factor=LABEL_TEXT_CHARSPACE_FACT
textblock_fixed_height=1

DEFINE STYLE{2} "TypeLabel" Font, LABEL_TEXT_SIZE, LABEL_FONT_STYLE
DEFINE STYLE{2} "TypeDetail" Font, Font_size, Font_style

PARAGRAPH "Unit_ID" alignment,
  firstline_indent, left_indent, right_indent, line_spacing
  SET STYLE "TypeLabel"
  identify + ""
  ENDPARAGRAPH

PARAGRAPH "Details" alignment,
  firstline_indent, left_indent, right_indent, line_spacing
  SET STYLE "TypeDetail"
  nr_rooms + "-TOALINE\n"
  unit_area + " m²"
  ENDPARAGRAPH

TEXTBLOCK "Label" textblock_width, textblock_anchor, textblock_angel,
  textblock_width_factor, textblock_charspace_factor, textblock_fixed_height,
  "Unit_ID","Details"

RICHTEXT2 0,0, "Label"

Print nr, identify, nr_rooms, unit_area
&lt;/PRE&gt;

2) And also, is there any way to automatically write lists or schedules? At the moment I'm forced to manually save the schedules as tabbed text files to retrieve data into the label object.&lt;BR /&gt;
&lt;BR /&gt;
3) I have also been experimenting with GDL DATA I/O ADD-ON to OUTPUT the measured areas from zones with custom zone stamp and sum them up based on zone ID with label object script but I haven't succeeded because I wasn't able to fix on what was the trigger to execute the OUTPUT command. Of course this would be preferable approach because it wouldn't require schedules and manually saving them so any help in this field would be also much appreciated.&lt;/R&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 08 Apr 2008 16:02:32 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2008-04-08T16:02:32Z</dc:date>
    <item>
      <title>2DScript error with GDL DATA INPUT variable inside PARAGRAPH</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/2DScript-error-with-GDL-DATA-INPUT-variable-inside-PARAGRAPH/m-p/68912#M28714</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;R&gt;I have created a label that will show flat name(via "Zone_relations" where zone number is flat name, though ID would be more suitable in this case but it's the limitation of the "Zone_relations" request), area etc and this is obtained through GDL DATA I/O ADD-ON by INPUT command that queries the database based on the key value. &lt;BR /&gt;
&lt;BR /&gt;
1) The problem lies with one DATA INPUT variable (nr_rooms) that causes 2D Script error inside paragraph. At the same time there is another exactly identical input variable(unit_area) just from another channel/file and it works just fine. With print or TEXT2 command the problematic variable gives correct feedback but not when inside the paragraph. This is my first script so I assume it's something simple that I'm not aware of.&lt;BR /&gt;
&lt;BR /&gt;
Master script:
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;rr1 = REQUEST ("Zone_relations", "", category_name, code, z_name, z_number)

identify = ""

key=z_number
ch1 = OPEN ("DATA", "KRT.txt", "SEPARATOR = '\t', MODE = RO, LIBRARY ")
ch2 = OPEN ("DATA", "KRT-toad.txt", "SEPARATOR = '\t', MODE = RO, LIBRARY ")
n = INPUT (ch1, key, 1, unit_area)
	if n &amp;lt;&amp;gt; 0 then
		identify = z_number
	else
		identify = Unit_ID
		key = Unit_ID
		n = INPUT (ch1, key, 1, unit_area)
	EndIF
nr = INPUT (ch2, key, 1, nr_rooms)
close ch1
close ch2
&lt;/PRE&gt;

2D Script:
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;Font=LABEL_FONT_NAME
Font_size=fsize
Font_style=Detail_font_style
alignment=LABEL_TEXT_ALIGN
firstline_indent=0
left_indent=0
right_indent=0
line_spacing=LABEL_TEXT_LEADING

textblock_width=0
textblock_anchor=1
textblock_angel=0
textblock_width_factor=LABEL_TEXT_WIDTH_FACT
textblock_charspace_factor=LABEL_TEXT_CHARSPACE_FACT
textblock_fixed_height=1

DEFINE STYLE{2} "TypeLabel" Font, LABEL_TEXT_SIZE, LABEL_FONT_STYLE
DEFINE STYLE{2} "TypeDetail" Font, Font_size, Font_style

PARAGRAPH "Unit_ID" alignment,
  firstline_indent, left_indent, right_indent, line_spacing
  SET STYLE "TypeLabel"
  identify + ""
  ENDPARAGRAPH

PARAGRAPH "Details" alignment,
  firstline_indent, left_indent, right_indent, line_spacing
  SET STYLE "TypeDetail"
  nr_rooms + "-TOALINE\n"
  unit_area + " m²"
  ENDPARAGRAPH

TEXTBLOCK "Label" textblock_width, textblock_anchor, textblock_angel,
  textblock_width_factor, textblock_charspace_factor, textblock_fixed_height,
  "Unit_ID","Details"

RICHTEXT2 0,0, "Label"

Print nr, identify, nr_rooms, unit_area
&lt;/PRE&gt;

2) And also, is there any way to automatically write lists or schedules? At the moment I'm forced to manually save the schedules as tabbed text files to retrieve data into the label object.&lt;BR /&gt;
&lt;BR /&gt;
3) I have also been experimenting with GDL DATA I/O ADD-ON to OUTPUT the measured areas from zones with custom zone stamp and sum them up based on zone ID with label object script but I haven't succeeded because I wasn't able to fix on what was the trigger to execute the OUTPUT command. Of course this would be preferable approach because it wouldn't require schedules and manually saving them so any help in this field would be also much appreciated.&lt;/R&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 08 Apr 2008 16:02:32 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/2DScript-error-with-GDL-DATA-INPUT-variable-inside-PARAGRAPH/m-p/68912#M28714</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-04-08T16:02:32Z</dc:date>
    </item>
    <item>
      <title>Re: 2DScript error with GDL DATA INPUT variable inside PARAG</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/2DScript-error-with-GDL-DATA-INPUT-variable-inside-PARAGRAPH/m-p/68913#M28715</link>
      <description>Similar problems have been discussed before:&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://archicad-talk.graphisoft.com/viewtopic.php?t=20132" target="_blank"&gt;&lt;LINK_TEXT text="http://archicad-talk.graphisoft.com/vie ... hp?t=20132"&gt;http://archicad-talk.graphisoft.com/viewtopic.php?t=20132&lt;/LINK_TEXT&gt;&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
It seems that the Paragraph text does not work quite as it should&lt;BR /&gt;
&lt;BR /&gt;
Anssi</description>
      <pubDate>Tue, 08 Apr 2008 22:03:06 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/2DScript-error-with-GDL-DATA-INPUT-variable-inside-PARAGRAPH/m-p/68913#M28715</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-04-08T22:03:06Z</dc:date>
    </item>
    <item>
      <title>Re: 2DScript error with GDL DATA INPUT variable inside PARAG</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/2DScript-error-with-GDL-DATA-INPUT-variable-inside-PARAGRAPH/m-p/68914#M28716</link>
      <description>&lt;BLOCKQUOTE&gt;Anssi wrote:&lt;BR /&gt;Similar problems have been discussed before:&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://archicad-talk.graphisoft.com/viewtopic.php?t=20132" target="_blank"&gt;&lt;LINK_TEXT text="http://archicad-talk.graphisoft.com/vie ... hp?t=20132"&gt;http://archicad-talk.graphisoft.com/viewtopic.php?t=20132&lt;/LINK_TEXT&gt;&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
It seems that the Paragraph text does not work quite as it should&lt;BR /&gt;
&lt;BR /&gt;
Anssi&lt;/BLOCKQUOTE&gt;

I am aware of that topic but I just can't see the solution there for the conflict I have besides the null string?&lt;BR /&gt;
&lt;BR /&gt;
Thanks</description>
      <pubDate>Wed, 09 Apr 2008 10:32:39 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/2DScript-error-with-GDL-DATA-INPUT-variable-inside-PARAGRAPH/m-p/68914#M28716</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-04-09T10:32:39Z</dc:date>
    </item>
    <item>
      <title>Re: 2DScript error with GDL DATA INPUT variable inside PARAG</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/2DScript-error-with-GDL-DATA-INPUT-variable-inside-PARAGRAPH/m-p/68915#M28717</link>
      <description>I'm getting some strange results. Script works only when requested value in a "KRT-toad.txt" file is number with comma or anything else. Plain number is not working... Exactly what I need. Way over my head!</description>
      <pubDate>Wed, 09 Apr 2008 11:13:46 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/2DScript-error-with-GDL-DATA-INPUT-variable-inside-PARAGRAPH/m-p/68915#M28717</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-04-09T11:13:46Z</dc:date>
    </item>
  </channel>
</rss>

