<?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 Zone stamp 2d script, Need Help Please, Thanks. in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/Zone-stamp-2d-script-Need-Help-Please-Thanks/m-p/88051#M37784</link>
    <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;Hi,&lt;BR /&gt;
This my first attempt write GDL. I have tried to modify the Zone_Stamp_02.gsm to show the Occupant load Factor (set as integer) and an Occupant Load ((set as integer) of an area. In 2D script I am getting some sort of mismatch errors in two places but can not fix them after 5 hrs of trial! could any one guide me? (attach is the file)&lt;BR /&gt;
&lt;BR /&gt;
!!!room_perim = "P: " + room_perim + lin_unit&lt;BR /&gt;
room_perim = peritext + room_perim + lin_unit&lt;BR /&gt;
&lt;BR /&gt;
!!!ol_factor = "OL Factor: " + ol_factor&lt;BR /&gt;
ol_factor = olftext + ol_factor                  &amp;lt; HAVING PROBLEM WITH THIS LINE&lt;BR /&gt;
&lt;BR /&gt;
code_string=basec!!!!+" "+wallc+" "+ceilc&lt;BR /&gt;
&lt;BR /&gt;
set style  "znamestyle"&lt;BR /&gt;
   w_roona = (stw (Zname)) * name                 !*** width of the strings - 0 if not displayed&lt;BR /&gt;
&lt;BR /&gt;
set style  "znumstyle"&lt;BR /&gt;
   w_roonu = (stw (ROOM_NUMBER)+2) * num &lt;BR /&gt;
&lt;BR /&gt;
set style  "codestyle"&lt;BR /&gt;
w_code = (stw (code_string)+2) * code&lt;BR /&gt;
&lt;BR /&gt;
set style  "arstyle"&lt;BR /&gt;
   w_rooar = (stw (room_area)+2) * area&lt;BR /&gt;
&lt;BR /&gt;
set style  "pestyle"&lt;BR /&gt;
   w_peri = (stw (room_perim)+2) * peri&lt;BR /&gt;
&lt;BR /&gt;
set style  "chstyle"&lt;BR /&gt;
   w_roohe = (stw (room_height)+2) * ceil_s&lt;BR /&gt;
&lt;BR /&gt;
set style  "olffstyle"&lt;BR /&gt;
   w_olf = (stw (ol_factor)+2) * olf                  &amp;lt; HAVING PROBLEM WITH THIS LINE&lt;BR /&gt;
&lt;BR /&gt;
max_len = max (name*w_roona, num*w_roonu, peri*w_peri, area*w_rooar, ceil_s*w_roohe, code*w_code, olf*w_olf)   !*** width of the stamp&lt;BR /&gt;
max_detlen = max (num*w_roonu, peri*w_peri, area*w_rooar, ceil_s*w_roohe, code*w_code, olf*w_olf)&lt;BR /&gt;
   max_h = - name*shight - (num + floor + area + peri + ceil_s + code + olf) * shight2        !*** height of the stamp&lt;/T&gt;&lt;/DIV&gt;</description>
    <pubDate>Fri, 20 May 2005 00:36:47 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2005-05-20T00:36:47Z</dc:date>
    <item>
      <title>Zone stamp 2d script, Need Help Please, Thanks.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Zone-stamp-2d-script-Need-Help-Please-Thanks/m-p/88051#M37784</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;Hi,&lt;BR /&gt;
This my first attempt write GDL. I have tried to modify the Zone_Stamp_02.gsm to show the Occupant load Factor (set as integer) and an Occupant Load ((set as integer) of an area. In 2D script I am getting some sort of mismatch errors in two places but can not fix them after 5 hrs of trial! could any one guide me? (attach is the file)&lt;BR /&gt;
&lt;BR /&gt;
!!!room_perim = "P: " + room_perim + lin_unit&lt;BR /&gt;
room_perim = peritext + room_perim + lin_unit&lt;BR /&gt;
&lt;BR /&gt;
!!!ol_factor = "OL Factor: " + ol_factor&lt;BR /&gt;
ol_factor = olftext + ol_factor                  &amp;lt; HAVING PROBLEM WITH THIS LINE&lt;BR /&gt;
&lt;BR /&gt;
code_string=basec!!!!+" "+wallc+" "+ceilc&lt;BR /&gt;
&lt;BR /&gt;
set style  "znamestyle"&lt;BR /&gt;
   w_roona = (stw (Zname)) * name                 !*** width of the strings - 0 if not displayed&lt;BR /&gt;
&lt;BR /&gt;
set style  "znumstyle"&lt;BR /&gt;
   w_roonu = (stw (ROOM_NUMBER)+2) * num &lt;BR /&gt;
&lt;BR /&gt;
set style  "codestyle"&lt;BR /&gt;
w_code = (stw (code_string)+2) * code&lt;BR /&gt;
&lt;BR /&gt;
set style  "arstyle"&lt;BR /&gt;
   w_rooar = (stw (room_area)+2) * area&lt;BR /&gt;
&lt;BR /&gt;
set style  "pestyle"&lt;BR /&gt;
   w_peri = (stw (room_perim)+2) * peri&lt;BR /&gt;
&lt;BR /&gt;
set style  "chstyle"&lt;BR /&gt;
   w_roohe = (stw (room_height)+2) * ceil_s&lt;BR /&gt;
&lt;BR /&gt;
set style  "olffstyle"&lt;BR /&gt;
   w_olf = (stw (ol_factor)+2) * olf                  &amp;lt; HAVING PROBLEM WITH THIS LINE&lt;BR /&gt;
&lt;BR /&gt;
max_len = max (name*w_roona, num*w_roonu, peri*w_peri, area*w_rooar, ceil_s*w_roohe, code*w_code, olf*w_olf)   !*** width of the stamp&lt;BR /&gt;
max_detlen = max (num*w_roonu, peri*w_peri, area*w_rooar, ceil_s*w_roohe, code*w_code, olf*w_olf)&lt;BR /&gt;
   max_h = - name*shight - (num + floor + area + peri + ceil_s + code + olf) * shight2        !*** height of the stamp&lt;/T&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 20 May 2005 00:36:47 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Zone-stamp-2d-script-Need-Help-Please-Thanks/m-p/88051#M37784</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-05-20T00:36:47Z</dc:date>
    </item>
    <item>
      <title>Re: Zone stamp 2d script, Need Help Please, Thanks.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Zone-stamp-2d-script-Need-Help-Please-Thanks/m-p/88052#M37785</link>
      <description>&lt;BLOCKQUOTE&gt;Joseph wrote:&lt;BR /&gt;In 2D script I am getting some sort of mismatch errors in two places...&lt;BR /&gt;
...&lt;BR /&gt;
ol_factor = olftext + ol_factor                  &amp;lt; HAVING PROBLEM WITH THIS LINE&lt;BR /&gt;
...&lt;BR /&gt;
   w_olf = (stw (ol_factor)+2) * olf                  &amp;lt; HAVING PROBLEM WITH THIS LINE
&lt;/BLOCKQUOTE&gt;
In the first problem line, you are trying to add two values which are not the same kind. 'olftext' is a string (textual) value, and 'ol_factor' is an integer (numeric) value. The + operator in GDL is designed to only add things of the same kind, e.g. '1 + 1 = 2' or '"ABC" + "DEF" = "ABCDEF"'. The problem line says something like '1 + "ABC" = ???'&lt;BR /&gt;
&lt;BR /&gt;
You can convert a number to a string with the STR function. So your line could be changed to:
&lt;PRE&gt;ol_factor = olftext + STR(ol_factor, 8, 0)&lt;/PRE&gt;
Read the documentation on STR to determine how you can best use it. The script now works with this change, but I would recommend another related change. The variable called 'ol_factor' is a parameter with an integer value. In your script you subsequently assign a string value to it. Although this works, I recommend not changing a variable's type. Create a new variable instead:
&lt;PRE&gt;olFactorText = olftext + STR(ol_factor, 8, 0)
...
w_olf = (STW(olFactorText) + 2) * olf
...
TEXT2 dist, -vlen, olFactorText&lt;/PRE&gt;</description>
      <pubDate>Fri, 20 May 2005 08:40:50 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Zone-stamp-2d-script-Need-Help-Please-Thanks/m-p/88052#M37785</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2005-05-20T08:40:50Z</dc:date>
    </item>
    <item>
      <title>Re: Zone stamp 2d script, Need Help Please, Thanks.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Zone-stamp-2d-script-Need-Help-Please-Thanks/m-p/88053#M37786</link>
      <description>&lt;BLOCKQUOTE&gt;Ralph wrote:&lt;BR /&gt;In the first problem line, you are trying to add two values which are not the same kind. 'olftext' is a string (textual) value, and 'ol_factor' is an integer (numeric) value. The + operator in GDL is designed to only add things of the same kind, e.g. '1 + 1 = 2' or '"ABC" + "DEF" = "ABCDEF"'. The problem line says something like '1 + "ABC" = ???'&lt;/BLOCKQUOTE&gt;
Thanks a million Jay,&lt;BR /&gt;
Two more questions:&lt;BR /&gt;
&lt;BR /&gt;
1. Based on what you say, In expression "w_olf = (STW(olFactorText) + 2) * olf" what is the reason for multiplying by "olf" parameter? Is it that if this parameter olf, is 1 if set to ON and 0 if set to OFF so we want to make the value of "w_olf " to zero when olf is set to OFF so will not have effect on other parts of the script?&lt;BR /&gt;
&lt;BR /&gt;
Futher more, If so 1 or 0 are INTEGERS and olFactorText is TEXT?&lt;BR /&gt;
&lt;BR /&gt;
2. Also based on what you say, the previous line of the code on ROOM_PERIM = PERITEXT + ROOM_PERIM + LIN_UNIT should not wok either since: ROOM_PERIM is lengthand I assume a REAL number and PERITEXT is text!?&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Joseph</description>
      <pubDate>Fri, 20 May 2005 18:24:30 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Zone-stamp-2d-script-Need-Help-Please-Thanks/m-p/88053#M37786</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-05-20T18:24:30Z</dc:date>
    </item>
    <item>
      <title>Re: Zone stamp 2d script, Need Help Please, Thanks.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Zone-stamp-2d-script-Need-Help-Please-Thanks/m-p/88054#M37787</link>
      <description>&lt;BLOCKQUOTE&gt;Joseph wrote:&lt;BR /&gt;1. Based on what you say, In expression "w_olf = (STW(olFactorText) + 2) * olf" what is the reason for multiplying by "olf" parameter? Is it that if this parameter olf, is 1 if set to ON and 0 if set to OFF so we want to make the value of "w_olf " to zero when olf is set to OFF so will not have effect on other parts of the script?&lt;BR /&gt;
Futher more, If so 1 or 0 are INTEGERS and olFactorText is TEXT?&lt;/BLOCKQUOTE&gt;
The STW function returns the (display) length of a string, i.e. it's size when it is displayed in a drawing. Therefore, STW(olFactorText) will give you the length of the string in the variable olFactorText.&lt;BR /&gt;
&lt;BR /&gt;
The parameter olf is a boolean variable - it can only have two values or states which you could describe as true or false, on or off, 1 or 0. If you use a boolean value in an arithmetic expression, it will have the value 1 if it is set to true, or 0 if it is set to false.&lt;BR /&gt;
&lt;BR /&gt;
This particular line will result in a length of 0 if 'olf' is false because it will be multiplied by 0. Otherwise, it will return the length of 'olFactorText + 2'.&lt;BR /&gt;

&lt;BLOCKQUOTE&gt;Joseph wrote:&lt;BR /&gt;2. Also based on what you say, the previous line of the code on ROOM_PERIM = PERITEXT + ROOM_PERIM + LIN_UNIT should not wok either since: ROOM_PERIM is lengthand I assume a REAL number and PERITEXT is text!?&lt;/BLOCKQUOTE&gt;
No, all the variables in that line are text. The author of the script has assigned text values to variables that were originally numbers:
&lt;PRE&gt;room_perim = str (lin_form , ROOM_PERIM)&lt;/PRE&gt;
The confusion you are feeling is the reason for my suggestion to use different names rather than changing the type of an existing variable.</description>
      <pubDate>Fri, 20 May 2005 21:35:20 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Zone-stamp-2d-script-Need-Help-Please-Thanks/m-p/88054#M37787</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2005-05-20T21:35:20Z</dc:date>
    </item>
    <item>
      <title>Re: Zone stamp 2d script, Need Help Please, Thanks.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Zone-stamp-2d-script-Need-Help-Please-Thanks/m-p/88055#M37788</link>
      <description>&lt;BLOCKQUOTE&gt;Ralph wrote:&lt;BR /&gt;The confusion you are feeling is the reason for my suggestion to use different names rather than changing the type of an existing variable.&lt;/BLOCKQUOTE&gt;

Thanks and have a GREAT week end, after your guidance I will have a great one also.&lt;BR /&gt;
&lt;BR /&gt;
Joseph</description>
      <pubDate>Fri, 20 May 2005 21:42:48 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Zone-stamp-2d-script-Need-Help-Please-Thanks/m-p/88055#M37788</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-05-20T21:42:48Z</dc:date>
    </item>
    <item>
      <title>Re: Zone stamp 2d script, Need Help Please, Thanks.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Zone-stamp-2d-script-Need-Help-Please-Thanks/m-p/88056#M37789</link>
      <description>&lt;BLOCKQUOTE&gt;Ralph wrote:&lt;BR /&gt;
No, all the variables in that line are text. The author of the script has assigned text values to variables that were originally numbers &lt;/BLOCKQUOTE&gt;
Ralph,&lt;BR /&gt;
I tried to get the integer (INT) portion of the parameter room_area so I can have the area with out the decimals (for better representation in the stamp), but I am getting an error.&lt;BR /&gt;
I guess it is because it is converted to text somehow. Could you give me guidance how to convert it back to integer AND/OR not showing the decimals?&lt;BR /&gt;
Thanks very much,&lt;BR /&gt;
Joseph</description>
      <pubDate>Thu, 26 May 2005 19:06:05 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Zone-stamp-2d-script-Need-Help-Please-Thanks/m-p/88056#M37789</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-05-26T19:06:05Z</dc:date>
    </item>
    <item>
      <title>Re: Zone stamp 2d script, Need Help Please, Thanks.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Zone-stamp-2d-script-Need-Help-Please-Thanks/m-p/88057#M37790</link>
      <description>&lt;BLOCKQUOTE&gt;Joseph wrote:&lt;BR /&gt;I tried to get the integer (INT) portion of the parameter room_area so I can have the area with out the decimals (for better representation in the stamp), but I am getting an error.&lt;BR /&gt;
I guess it is because it is converted to text somehow.&lt;/BLOCKQUOTE&gt;

Yes, it is converted on the following line:
&lt;PRE&gt;room_area = str (area_form, Temp_CalcArea)&lt;/PRE&gt;

It would be better to use a different variable name for the text version so you can retain the original value (and the two can't be confused with each other), e.g.
&lt;PRE&gt;roomAreaText = str (area_form, Temp_CalcArea)&lt;/PRE&gt;

The author of this object has used lower case for the text variable, so you could quickly change every instance with "Find &amp;amp; Replace..." provided you check the 'Case Sensitive' option.</description>
      <pubDate>Thu, 02 Jun 2005 08:21:38 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Zone-stamp-2d-script-Need-Help-Please-Thanks/m-p/88057#M37790</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2005-06-02T08:21:38Z</dc:date>
    </item>
    <item>
      <title>Re: Zone stamp 2d script, Need Help Please, Thanks.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Zone-stamp-2d-script-Need-Help-Please-Thanks/m-p/88058#M37791</link>
      <description>&lt;BLOCKQUOTE&gt;Ralph wrote:&lt;BR /&gt;The author of this object has used lower case for the text variable, so you could quickly change every instance with "Find &amp;amp; Replace..." provided you check the 'Case Sensitive' option.&lt;/BLOCKQUOTE&gt;

Welcome Back and here I go again,&lt;BR /&gt;
I took your advice and changed all the&lt;BR /&gt;
room_areas TO roomAreaText&lt;BR /&gt;
&lt;BR /&gt;
A. This is how it looks:&lt;BR /&gt;
&lt;BR /&gt;
IF ROOM_POLY_STATUS=0 then Temp_CalcArea=ROOM_CALC_AREA		!! Method 1 and 2&lt;BR /&gt;
IF ROOM_POLY_STATUS=1 then Temp_CalcArea=ROOM_CALC_AREA		!! Method 3/Net&lt;BR /&gt;
IF ROOM_POLY_STATUS=2 then Temp_CalcArea=ROOM_AREA			!! Method 3/Gross&lt;BR /&gt;
&lt;BR /&gt;
Temp_CalcAreaINT = INT (Temp_CalcArea)             !!!!!&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;TO GET THE INTEGER&lt;BR /&gt;
&lt;BR /&gt;
area_form=""                                    !*** format as set in the Preferences&lt;BR /&gt;
  rrr=request ("Area_dimension","",area_form)&lt;BR /&gt;
!!   roomAreaText = str (area_form, Temp_CalcArea)&lt;BR /&gt;
   	 roomAreaText = str (area_form, Temp_CalcArea)&lt;BR /&gt;
&lt;BR /&gt;
But to my surprise from the variable Temp_CalcAreaINT not only I do not get an integer but a value of ZERO?!&lt;BR /&gt;
&lt;BR /&gt;
B. Then tried using from the "cook book" string=STR(item,6,1) gives you ‘123.5’ and applied it to:&lt;BR /&gt;
 roomAreaText = str (area_form, Temp_CalcArea,0) so I at lease get the area to show with out decimals I get an error?&lt;BR /&gt;
&lt;BR /&gt;
C. On top of it all what is the variable area_form?&lt;BR /&gt;
&lt;BR /&gt;
I have got a big headache with this, I hope I have not given it to you. &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_redface.gif" style="display : inline;" /&gt;  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_confused.gif" style="display : inline;" /&gt; &lt;BR /&gt;
Thanks,&lt;BR /&gt;
Joseph</description>
      <pubDate>Thu, 02 Jun 2005 21:06:21 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Zone-stamp-2d-script-Need-Help-Please-Thanks/m-p/88058#M37791</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-06-02T21:06:21Z</dc:date>
    </item>
  </channel>
</rss>

