<?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 iWindowClass and iWindowType in GDL</title>
    <link>https://community.graphisoft.com/t5/GDL/iWindowClass-and-iWindowType/m-p/689034#M8223</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have an object that you can load standard AC windows into with all of their associated settings. My current issue is that what settings are available depends on the variables&amp;nbsp;&lt;STRONG&gt;iWindowClass&lt;/STRONG&gt; and&amp;nbsp;&lt;STRONG&gt;iWindowType&lt;/STRONG&gt; which when change to or from any of the&amp;nbsp;&lt;EM&gt;Multisash&lt;/EM&gt; options (iWindowType 42 or 43, iWindowClass 8 )&amp;nbsp;breaks the object by making&amp;nbsp;&lt;STRONG&gt;optypeIDArray[CasementID]&lt;/STRONG&gt; in the&amp;nbsp;&lt;EM&gt;GeneralWindowUnit&lt;/EM&gt; macro&amp;nbsp;return an invalid result... I tried setting&amp;nbsp;&lt;STRONG&gt;iWindowClass&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;&lt;/STRONG&gt;automatically based on the&amp;nbsp;&lt;STRONG&gt;iWindowType&lt;/STRONG&gt; input, but it only returns 8 for some reason...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;IF GLOB_MODPAR_NAME = "iWindowType" then
	IF iWindowType &amp;lt;= 9 then			iWindowClass = 1
	IF 10 &amp;lt;= iWindowType &amp;lt;= 15 then		iWindowClass = 2
	IF 23 &amp;lt;= iWindowType &amp;lt;= 25 then		iWindowClass = 3
	IF 26 &amp;lt;= iWindowType &amp;lt;= 28 then		iWindowClass = 4
	IF 16 &amp;lt;= iWindowType &amp;lt;= 17 then		iWindowClass = 5
	IF 29 &amp;lt;= iWindowType &amp;lt;= 39 then		iWindowClass = 6
	IF 45&amp;lt;= iWindowType &amp;lt;= 48 | 100 &amp;lt;= iWindowType &amp;lt;= 102 then	iWindowClass = 7
	IF 42 &amp;lt;= iWindowType &amp;lt;= 43 then		iWindowClass = 8
	IF iWindowType = 99 then			iWindowClass = 99

	PARAMETERS iWindowClass = iWindowClass
endIF&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ling.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;VALUES{2} "iWindowType"	1,	"WIN_W1",
						2,	"WIN_WDoubleSash",
						3,	"WIN_W2",
						4,	"WIN_W2Sidelight",
						5,	"WIN_W3",
						6,	"WIN_W32Sidelights",
						7,	"WIN_W32Sidelights2",
						8,	"WIN_WVariable",
						9,	"WIN_WVariableDoubleSash",
						10,	"WIN_HistoricWindowSingle2",
						11,	"WIN_HistoricWindowSingle",
						12,	"WIN_HistoricWindowDouble",
						13,	"WIN_HistoricWindowTriple",
						14,	"WIN_HistoricWindowSegmented",
						15,	"WIN_HistoricWindowTripleArched",
						16,	"WIN_W2HorizontalSlide",
						17,	"WIN_W4HorizontalSlide",
						18,	"WIN_Curved",
						19,	"WIN_Bow",
						20,	"WIN_SplayBay",
						21,	"WIN_SquareBay",
						22,	"WIN_Ribbon",
						23,	"WIN_WSingleHung1",
						24,	"WIN_WSingleHung2",
						25,	"WIN_WSingleHung3",
						26,	"WIN_WDoubleHung1",
						27,	"WIN_WDoubleHung2",
						28,	"WIN_WDoubleHung3",
						29,	"WIN_WRound",
						30,	"WIN_WOval",
						31,	"WIN_WMultiside",
						32,	"WIN_WHalfRound",
						33,	"WIN_WQuarterRound",
						34,	"WIN_WPentagon",
						35,	"WIN_WTriangle",
						36,	"WIN_WEyebrows",
						37,	"WIN_WArched",
						38,	"WIN_WTrapezoid",
						39,	"WIN_WTrapezoidDoubleSash",
						40,	"WIN_VentWindow",
						41,	"WIN_2SashSliding",
						42,	"WIN_MultisashHorizontal",
						43,	"WIN_MultisashVertical",
						44,	"WIN_GlassBlock",
						45,	"WIN_TerraceDoorSWE",
						46,	"WIN_W3HorizontalSlide",
						47,	"WIN_W6HorizontalSlide",
						48,	"WIN_VentilationBrick",
						49,	"WIN_Rhomb",
						50,	"WIN_Skewed",
						99,	"WIN_Custom",
						100,"DOOR_NoSidelight",
						101,"DOOR_OneSidelight",
						102,"DOOR_TwoSidelight"

VALUES{2} "iWindowClass"	1,	"WINCLASS_NORMAL",
							2,	"WINCLASS_HISTORIC",
							3,	"WINCLASS_SINGLE_HUNG",
							4,	"WINCLASS_DOUBLE_HUNG",
							5,	"WINCLASS_HORIZONTAL_SLIDING",
							6,	"WINCLASS_SPECIAL",
							7,	"WINCLASS_DOORSASH",
							8,	"WINCLASS_MULTISASH",
							10,	"WINCLASS_SHELL",
							99,	"WINCLASS_CUSTOM"&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 13 Jan 2026 08:17:20 GMT</pubDate>
    <dc:creator>Lingwisyer</dc:creator>
    <dc:date>2026-01-13T08:17:20Z</dc:date>
    <item>
      <title>iWindowClass and iWindowType</title>
      <link>https://community.graphisoft.com/t5/GDL/iWindowClass-and-iWindowType/m-p/689034#M8223</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have an object that you can load standard AC windows into with all of their associated settings. My current issue is that what settings are available depends on the variables&amp;nbsp;&lt;STRONG&gt;iWindowClass&lt;/STRONG&gt; and&amp;nbsp;&lt;STRONG&gt;iWindowType&lt;/STRONG&gt; which when change to or from any of the&amp;nbsp;&lt;EM&gt;Multisash&lt;/EM&gt; options (iWindowType 42 or 43, iWindowClass 8 )&amp;nbsp;breaks the object by making&amp;nbsp;&lt;STRONG&gt;optypeIDArray[CasementID]&lt;/STRONG&gt; in the&amp;nbsp;&lt;EM&gt;GeneralWindowUnit&lt;/EM&gt; macro&amp;nbsp;return an invalid result... I tried setting&amp;nbsp;&lt;STRONG&gt;iWindowClass&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;&lt;/STRONG&gt;automatically based on the&amp;nbsp;&lt;STRONG&gt;iWindowType&lt;/STRONG&gt; input, but it only returns 8 for some reason...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;IF GLOB_MODPAR_NAME = "iWindowType" then
	IF iWindowType &amp;lt;= 9 then			iWindowClass = 1
	IF 10 &amp;lt;= iWindowType &amp;lt;= 15 then		iWindowClass = 2
	IF 23 &amp;lt;= iWindowType &amp;lt;= 25 then		iWindowClass = 3
	IF 26 &amp;lt;= iWindowType &amp;lt;= 28 then		iWindowClass = 4
	IF 16 &amp;lt;= iWindowType &amp;lt;= 17 then		iWindowClass = 5
	IF 29 &amp;lt;= iWindowType &amp;lt;= 39 then		iWindowClass = 6
	IF 45&amp;lt;= iWindowType &amp;lt;= 48 | 100 &amp;lt;= iWindowType &amp;lt;= 102 then	iWindowClass = 7
	IF 42 &amp;lt;= iWindowType &amp;lt;= 43 then		iWindowClass = 8
	IF iWindowType = 99 then			iWindowClass = 99

	PARAMETERS iWindowClass = iWindowClass
endIF&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ling.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;VALUES{2} "iWindowType"	1,	"WIN_W1",
						2,	"WIN_WDoubleSash",
						3,	"WIN_W2",
						4,	"WIN_W2Sidelight",
						5,	"WIN_W3",
						6,	"WIN_W32Sidelights",
						7,	"WIN_W32Sidelights2",
						8,	"WIN_WVariable",
						9,	"WIN_WVariableDoubleSash",
						10,	"WIN_HistoricWindowSingle2",
						11,	"WIN_HistoricWindowSingle",
						12,	"WIN_HistoricWindowDouble",
						13,	"WIN_HistoricWindowTriple",
						14,	"WIN_HistoricWindowSegmented",
						15,	"WIN_HistoricWindowTripleArched",
						16,	"WIN_W2HorizontalSlide",
						17,	"WIN_W4HorizontalSlide",
						18,	"WIN_Curved",
						19,	"WIN_Bow",
						20,	"WIN_SplayBay",
						21,	"WIN_SquareBay",
						22,	"WIN_Ribbon",
						23,	"WIN_WSingleHung1",
						24,	"WIN_WSingleHung2",
						25,	"WIN_WSingleHung3",
						26,	"WIN_WDoubleHung1",
						27,	"WIN_WDoubleHung2",
						28,	"WIN_WDoubleHung3",
						29,	"WIN_WRound",
						30,	"WIN_WOval",
						31,	"WIN_WMultiside",
						32,	"WIN_WHalfRound",
						33,	"WIN_WQuarterRound",
						34,	"WIN_WPentagon",
						35,	"WIN_WTriangle",
						36,	"WIN_WEyebrows",
						37,	"WIN_WArched",
						38,	"WIN_WTrapezoid",
						39,	"WIN_WTrapezoidDoubleSash",
						40,	"WIN_VentWindow",
						41,	"WIN_2SashSliding",
						42,	"WIN_MultisashHorizontal",
						43,	"WIN_MultisashVertical",
						44,	"WIN_GlassBlock",
						45,	"WIN_TerraceDoorSWE",
						46,	"WIN_W3HorizontalSlide",
						47,	"WIN_W6HorizontalSlide",
						48,	"WIN_VentilationBrick",
						49,	"WIN_Rhomb",
						50,	"WIN_Skewed",
						99,	"WIN_Custom",
						100,"DOOR_NoSidelight",
						101,"DOOR_OneSidelight",
						102,"DOOR_TwoSidelight"

VALUES{2} "iWindowClass"	1,	"WINCLASS_NORMAL",
							2,	"WINCLASS_HISTORIC",
							3,	"WINCLASS_SINGLE_HUNG",
							4,	"WINCLASS_DOUBLE_HUNG",
							5,	"WINCLASS_HORIZONTAL_SLIDING",
							6,	"WINCLASS_SPECIAL",
							7,	"WINCLASS_DOORSASH",
							8,	"WINCLASS_MULTISASH",
							10,	"WINCLASS_SHELL",
							99,	"WINCLASS_CUSTOM"&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jan 2026 08:17:20 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/iWindowClass-and-iWindowType/m-p/689034#M8223</guid>
      <dc:creator>Lingwisyer</dc:creator>
      <dc:date>2026-01-13T08:17:20Z</dc:date>
    </item>
    <item>
      <title>Re: iWindowClass and iWindowType</title>
      <link>https://community.graphisoft.com/t5/GDL/iWindowClass-and-iWindowType/m-p/689461#M8229</link>
      <description>&lt;P&gt;Hi Ling,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think your 'IF' conditions are not as you intend.&lt;/P&gt;
&lt;P&gt;You'd need to format them like in this test:&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;iWindowType = 10

IF iWindowType &amp;lt;= 9 then			iWindowClass = 1
IF 10 &amp;lt;= iWindowType &amp;amp; iWindowType &amp;lt;= 15 then		iWindowClass = 2
IF 23 &amp;lt;= iWindowType &amp;amp; iWindowType &amp;lt;= 25 then		iWindowClass = 3
IF 26 &amp;lt;= iWindowType &amp;amp; iWindowType &amp;lt;= 28 then		iWindowClass = 4
IF 16 &amp;lt;= iWindowType &amp;amp; iWindowType &amp;lt;= 17 then		iWindowClass = 5
IF 29 &amp;lt;= iWindowType &amp;amp; iWindowType &amp;lt;= 39 then		iWindowClass = 6
IF (45&amp;lt;= iWindowType&amp;amp; iWindowType &amp;lt;= 48) | (100 &amp;lt;= iWindowType &amp;amp; iWindowType &amp;lt;= 102) then	iWindowClass = 7
IF 42 &amp;lt;= iWindowType &amp;amp; iWindowType &amp;lt;= 43 then		iWindowClass = 8
IF iWindowType = 99 then			iWindowClass = 99

text2 0, 0, str("%", iWindowClass)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope that helps,&lt;BR /&gt;Bernd&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Edit:&lt;/STRONG&gt;&amp;nbsp;As a good exercise for the reader, you can figure out why the 'iWindowClass' was always '8' in the original question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Explanation:&lt;/P&gt;
&lt;LI-SPOILER&gt;
&lt;P&gt;First let's look at the following code + comments:&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;x = 9

a = 10 &amp;lt;= x &amp;lt;= 13  ! for x=9 this results in '1.0'! but why?
text2 0, 0, "a: " + str("%", a)

b = 10 &amp;lt;= x ! for x=9 this is 'false' - so b = 0.0
text2 0, 1, "b: " + str("%", b)

c = b &amp;lt;= 13 ! if b=0.0 then this is 'true' - so c=1.0! But even if b=1.0, then c=1.0!!
text2 0, 2, "c: " + str("%", c)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;Now looking back at the original post, we see that&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;42 &amp;lt;= iWindowType &amp;lt;= 43&lt;/LI-CODE&gt;
&lt;P&gt;will always return '1.0'! The other statements behave the same. (except the last statement with comparison to 99).&lt;BR /&gt;That's why the second to last check for iWindowType will always "win" and set iWindowClass=8. The only exception is for iWindowType=99.&lt;/P&gt;
&lt;/LI-SPOILER&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jan 2026 11:29:35 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/iWindowClass-and-iWindowType/m-p/689461#M8229</guid>
      <dc:creator>BerndSchwarzenbacher</dc:creator>
      <dc:date>2026-01-14T11:29:35Z</dc:date>
    </item>
    <item>
      <title>Re: iWindowClass and iWindowType</title>
      <link>https://community.graphisoft.com/t5/GDL/iWindowClass-and-iWindowType/m-p/689713#M8231</link>
      <description>&lt;P&gt;Interpreted as an OR... What is math... Did not even cross my mind...&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jan 2026 01:08:37 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/iWindowClass-and-iWindowType/m-p/689713#M8231</guid>
      <dc:creator>Lingwisyer</dc:creator>
      <dc:date>2026-01-15T01:08:37Z</dc:date>
    </item>
    <item>
      <title>Re: iWindowClass and iWindowType</title>
      <link>https://community.graphisoft.com/t5/GDL/iWindowClass-and-iWindowType/m-p/689724#M8232</link>
      <description>&lt;P&gt;I wouldn't say it's interpreted as an OR. It's more that operator precedence is left to right.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jan 2026 05:38:43 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/iWindowClass-and-iWindowType/m-p/689724#M8232</guid>
      <dc:creator>BerndSchwarzenbacher</dc:creator>
      <dc:date>2026-01-15T05:38:43Z</dc:date>
    </item>
    <item>
      <title>Re: iWindowClass and iWindowType</title>
      <link>https://community.graphisoft.com/t5/GDL/iWindowClass-and-iWindowType/m-p/689751#M8233</link>
      <description>&lt;P&gt;Took a bit of messing about with it to get it. So it resolves the left true or false, then uses that result, a 1 or 0, for the following, hence mirroring the equation will always return a 0. That explains your c = b comment, was a bit confused that that.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jan 2026 08:06:17 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/iWindowClass-and-iWindowType/m-p/689751#M8233</guid>
      <dc:creator>Lingwisyer</dc:creator>
      <dc:date>2026-01-15T08:06:17Z</dc:date>
    </item>
  </channel>
</rss>

