<?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: Can't create textblock with string from REQUEST(... in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/Can-t-create-textblock-with-string-from-REQUEST/m-p/244360#M6985</link>
    <description>Maybe this is a bug in ArchiCAD. I dont't know.&lt;BR /&gt;
But this works, if you want to use TEXT2:&lt;BR /&gt;
x = REQUEST ("Zone_category", "", catname, code)&lt;BR /&gt;
TEXT2 0, 0, catname</description>
    <pubDate>Wed, 16 Nov 2016 20:58:41 GMT</pubDate>
    <dc:creator>Jochen Suehlo</dc:creator>
    <dc:date>2016-11-16T20:58:41Z</dc:date>
    <item>
      <title>Can't create textblock with string from REQUEST(...</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-t-create-textblock-with-string-from-REQUEST/m-p/244359#M6984</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;Hello!&lt;BR /&gt;
&lt;BR /&gt;
My code:&lt;BR /&gt;
&lt;BR /&gt;
REQUEST ("Zone_category", "", catname, code)&lt;BR /&gt;
TEXTBLOCK "MY_TEXTBLOCK_1" 0, 5, 0, 1, 1, 0, catname&lt;BR /&gt;
&lt;BR /&gt;
I get the error "requires an expression of type string"&lt;BR /&gt;
&lt;BR /&gt;
But:&lt;BR /&gt;
 &lt;BR /&gt;
catname = "tmp_cat_name"&lt;BR /&gt;
TEXTBLOCK "MY_TEXTBLOCK_1" 0, 5, 0, 1, 1, 0, catname&lt;BR /&gt;
&lt;BR /&gt;
work without errors.&lt;BR /&gt;
&lt;BR /&gt;
How I can get category name and create textblock with it?&lt;BR /&gt;
&lt;BR /&gt;
Help me, please!)&lt;/T&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 16 Nov 2016 18:39:55 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-t-create-textblock-with-string-from-REQUEST/m-p/244359#M6984</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-16T18:39:55Z</dc:date>
    </item>
    <item>
      <title>Re: Can't create textblock with string from REQUEST(...</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-t-create-textblock-with-string-from-REQUEST/m-p/244360#M6985</link>
      <description>Maybe this is a bug in ArchiCAD. I dont't know.&lt;BR /&gt;
But this works, if you want to use TEXT2:&lt;BR /&gt;
x = REQUEST ("Zone_category", "", catname, code)&lt;BR /&gt;
TEXT2 0, 0, catname</description>
      <pubDate>Wed, 16 Nov 2016 20:58:41 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-t-create-textblock-with-string-from-REQUEST/m-p/244360#M6985</guid>
      <dc:creator>Jochen Suehlo</dc:creator>
      <dc:date>2016-11-16T20:58:41Z</dc:date>
    </item>
    <item>
      <title>Re: Can't create textblock with string from REQUEST(...</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-t-create-textblock-with-string-from-REQUEST/m-p/244361#M6986</link>
      <description>Maybe at first before request:&lt;BR /&gt;
&lt;BR /&gt;
catname = ""&lt;BR /&gt;
&lt;BR /&gt;
guessing...had something similar lately.&lt;BR /&gt;
&lt;BR /&gt;
Best Regards,&lt;BR /&gt;
Piotr</description>
      <pubDate>Wed, 16 Nov 2016 22:12:42 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-t-create-textblock-with-string-from-REQUEST/m-p/244361#M6986</guid>
      <dc:creator>Piotr Dobrowolski</dc:creator>
      <dc:date>2016-11-16T22:12:42Z</dc:date>
    </item>
    <item>
      <title>Re: Can't create textblock with string from REQUEST(...</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-t-create-textblock-with-string-from-REQUEST/m-p/244362#M6987</link>
      <description>I tried:&lt;BR /&gt;
&lt;BR /&gt;
catname = ""&lt;BR /&gt;
REQUEST ("Zone_category", "", catname, code)&lt;BR /&gt;
TEXTBLOCK "MY_TEXTBLOCK_1" 0, 5, 0, 1, 1, 0, catname &lt;BR /&gt;
&lt;BR /&gt;
gives an error too (</description>
      <pubDate>Thu, 17 Nov 2016 03:40:13 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-t-create-textblock-with-string-from-REQUEST/m-p/244362#M6987</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-17T03:40:13Z</dc:date>
    </item>
    <item>
      <title>Re: Can't create textblock with string from REQUEST(...</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-t-create-textblock-with-string-from-REQUEST/m-p/244363#M6988</link>
      <description>&lt;BLOCKQUOTE&gt;Tsepov wrote:&lt;BR /&gt;I tried:&lt;BR /&gt;
&lt;BR /&gt;
catname = ""&lt;BR /&gt;
REQUEST ("Zone_category", "", catname, code)&lt;BR /&gt;
TEXTBLOCK "MY_TEXTBLOCK_1" 0, 5, 0, 1, 1, 0, catname &lt;BR /&gt;
&lt;BR /&gt;
gives an error too (&lt;/BLOCKQUOTE&gt;

It should work normally.&lt;BR /&gt;
I do not think that you accidentally forgot about the paragraph, but here is the complete code (simplified, without coefficients) just in case.
&lt;PRE&gt;Catname = ""
Catcode = ""
	QW= REQUEST("Zone_Category", "", Catname, Catcode)
PARAGRAPH "NAMECAT" 2, 0, 0, 0, 1
	""+Catname
	ENDPARAGRAPH

TEXTBLOCK "CAT" 0, 5, 0, 1, 1,1,"NAMECAT"
RICHTEXT2  0, 1, "CAT"&lt;/PRE&gt;</description>
      <pubDate>Thu, 17 Nov 2016 03:53:20 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-t-create-textblock-with-string-from-REQUEST/m-p/244363#M6988</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-17T03:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: Can't create textblock with string from REQUEST(...</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-t-create-textblock-with-string-from-REQUEST/m-p/244364#M6989</link>
      <description>I find with REQUEST you always have to say &lt;FONT color="#ff0000"&gt;xxx = &lt;/FONT&gt;REQUEST...&lt;BR /&gt;
This is because it returns a value to xxx if the request is successful or not.&lt;BR /&gt;
As well as returning the actual values you were requesting in the first place.&lt;BR /&gt;
&lt;BR /&gt;
Barry.</description>
      <pubDate>Thu, 17 Nov 2016 05:15:53 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-t-create-textblock-with-string-from-REQUEST/m-p/244364#M6989</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2016-11-17T05:15:53Z</dc:date>
    </item>
    <item>
      <title>Re: Can't create textblock with string from REQUEST(...</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-t-create-textblock-with-string-from-REQUEST/m-p/244365#M6990</link>
      <description>Its work!&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;Catname = ""&lt;BR /&gt;
Catcode = ""&lt;BR /&gt;
   QW= REQUEST("Zone_Category", "", Catname, Catcode)&lt;BR /&gt;
PARAGRAPH "NAMECAT" 2, 0, 0, 0, 1&lt;BR /&gt;
   ""+Catname&lt;BR /&gt;
   ENDPARAGRAPH&lt;BR /&gt;
&lt;BR /&gt;
TEXTBLOCK "CAT" 0, 5, 0, 1, 1,1,"NAMECAT"&lt;BR /&gt;
RICHTEXT2  0, 1, "CAT"&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
SL_GDL, many thanks for the help!</description>
      <pubDate>Fri, 18 Nov 2016 05:45:41 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-t-create-textblock-with-string-from-REQUEST/m-p/244365#M6990</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-18T05:45:41Z</dc:date>
    </item>
    <item>
      <title>Re: Can't create textblock with string from REQUEST(...</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Can-t-create-textblock-with-string-from-REQUEST/m-p/244366#M6991</link>
      <description>to avoid errors with str var type after REQUEST it is better to do so:&lt;BR /&gt;
&lt;BR /&gt;
QW= REQUEST("Zone_Category", "", Catname, Catcode)&lt;BR /&gt;
&lt;BR /&gt;
IF QW &amp;lt;&amp;gt; 0 THEN ! if answeres more then 0&lt;BR /&gt;
   Catname_ = Catname&lt;BR /&gt;
ELSE&lt;BR /&gt;
   Catname_ = ""&lt;BR /&gt;
ENDIF&lt;BR /&gt;
&lt;BR /&gt;
PARAGRAPH "NAMECAT" 2, 0, 0, 0, 1&lt;BR /&gt;
   Catname_&lt;BR /&gt;
ENDPARAGRAPH&lt;BR /&gt;
&lt;BR /&gt;
TEXTBLOCK "CAT" 0, 5, 0, 1, 1,1,"NAMECAT"&lt;BR /&gt;
RICHTEXT2 0, 1, "CAT"</description>
      <pubDate>Tue, 18 Apr 2017 05:14:28 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Can-t-create-textblock-with-string-from-REQUEST/m-p/244366#M6991</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-04-18T05:14:28Z</dc:date>
    </item>
  </channel>
</rss>

