<?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: Story level editing with graphical hotspots in GDL</title>
    <link>https://community.graphisoft.com/t5/GDL/Story-level-editing-with-graphical-hotspots/m-p/622668#M6897</link>
    <description>&lt;P&gt;Thanks for the response! I have every storey's height as a separate parameter (storey_height_01, storey_height_02 etc.), which means (I think?) that I have to write code for every storey. Do you know of any way to work around this? Is there for example any way to put an array as a parameter instead, while still making it look like the image below?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Kaj_AL_0-1723624379545.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/70400i1533C76B7733F48C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Kaj_AL_0-1723624379545.png" alt="Kaj_AL_0-1723624379545.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 14 Aug 2024 08:33:53 GMT</pubDate>
    <dc:creator>Kaj_AL</dc:creator>
    <dc:date>2024-08-14T08:33:53Z</dc:date>
    <item>
      <title>Story level editing with graphical hotspots</title>
      <link>https://community.graphisoft.com/t5/GDL/Story-level-editing-with-graphical-hotspots/m-p/622597#M6891</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a building object where number of stories can be set and edited with a graphical hotspot. This number is an integer. When I edit it in 3D it is read as meters, meaning if I move the hotspot to 12 meters above the ground I get 12 stories. I would like to divide this by 3, so I get a new story every 3 meters. Is there any way to do this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Even better would be if the story height could be read as well (which also can be edited), but 3 meters will do fine if it's not possible.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;P&gt;/Kaj&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Skärmbild 2024-08-13 145448.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/70378i52E1A37404A7E2D2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Skärmbild 2024-08-13 145448.png" alt="Skärmbild 2024-08-13 145448.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2024 13:12:52 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Story-level-editing-with-graphical-hotspots/m-p/622597#M6891</guid>
      <dc:creator>Kaj_AL</dc:creator>
      <dc:date>2024-08-13T13:12:52Z</dc:date>
    </item>
    <item>
      <title>Betreff: Story level editing with graphical hotspots</title>
      <link>https://community.graphisoft.com/t5/GDL/Story-level-editing-with-graphical-hotspots/m-p/622602#M6892</link>
      <description>&lt;P&gt;I use 3 parameters: the number of stories (int_anz_geschosse), the story height (z_geschoss) and the building height (z_story).&lt;/P&gt;
&lt;P&gt;Parameter-Script&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;DIM story_z[]
FOR i = 1 TO 100
	story_z[i] = i * z_geschoss
NEXT i

VALUES "z_story"  story_z

IF GLOB_MODPAR_NAME = "int_anz_geschosse" THEN
	z_story = int_anz_geschosse * z_geschoss
	PARAMETERS z_story = z_story
ENDIF

IF GLOB_MODPAR_NAME = "z_story" THEN
	int_anz_geschosse = z_story / z_geschoss
	PARAMETERS int_anz_geschosse = int_anz_geschosse
ENDIF&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;3D-Script&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;HOTSPOT 	0, 			0, - 0.1, 		htps + 1, z_story, 3
HOTSPOT 	0, 			0, 	0, 			htps + 2, z_story, 1 + 128
HOTSPOT 	0, 			0, 	z_story, 	htps + 3, z_story, 2, int_anz_geschosse
htps = htps + 3&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 13 Aug 2024 13:44:28 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Story-level-editing-with-graphical-hotspots/m-p/622602#M6892</guid>
      <dc:creator>Jochen Suehlo</dc:creator>
      <dc:date>2024-08-13T13:44:28Z</dc:date>
    </item>
    <item>
      <title>Re: Story level editing with graphical hotspots</title>
      <link>https://community.graphisoft.com/t5/GDL/Story-level-editing-with-graphical-hotspots/m-p/622649#M6895</link>
      <description>&lt;P&gt;The main point there being that you have used your&amp;nbsp;&lt;EM&gt;Storey&lt;/EM&gt; count as your distance vector, and given GDL is written in meters, we get the result presented. To get around that you use the&amp;nbsp;&lt;EM&gt;Hotspot Display Parameter&lt;/EM&gt; to provide your desired feedback while using&amp;nbsp;&lt;EM&gt;Building Height&amp;nbsp;&lt;/EM&gt;for the distance vector.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regarding your&amp;nbsp;&lt;EM&gt;Storey Height,&lt;/EM&gt; can you just use a second set of&amp;nbsp;&lt;EM&gt;Hotspots&lt;/EM&gt;?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2024 01:23:24 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Story-level-editing-with-graphical-hotspots/m-p/622649#M6895</guid>
      <dc:creator>Lingwisyer</dc:creator>
      <dc:date>2024-08-14T01:23:24Z</dc:date>
    </item>
    <item>
      <title>Betreff: Story level editing with graphical hotspots</title>
      <link>https://community.graphisoft.com/t5/GDL/Story-level-editing-with-graphical-hotspots/m-p/622660#M6896</link>
      <description>&lt;P&gt;Thank you!&lt;/P&gt;
&lt;P&gt;It took me some time to figure out what this does, but it does work really nicely!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/Kaj&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2024 08:21:08 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Story-level-editing-with-graphical-hotspots/m-p/622660#M6896</guid>
      <dc:creator>Kaj_AL</dc:creator>
      <dc:date>2024-08-14T08:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: Story level editing with graphical hotspots</title>
      <link>https://community.graphisoft.com/t5/GDL/Story-level-editing-with-graphical-hotspots/m-p/622668#M6897</link>
      <description>&lt;P&gt;Thanks for the response! I have every storey's height as a separate parameter (storey_height_01, storey_height_02 etc.), which means (I think?) that I have to write code for every storey. Do you know of any way to work around this? Is there for example any way to put an array as a parameter instead, while still making it look like the image below?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Kaj_AL_0-1723624379545.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/70400i1533C76B7733F48C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Kaj_AL_0-1723624379545.png" alt="Kaj_AL_0-1723624379545.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2024 08:33:53 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Story-level-editing-with-graphical-hotspots/m-p/622668#M6897</guid>
      <dc:creator>Kaj_AL</dc:creator>
      <dc:date>2024-08-14T08:33:53Z</dc:date>
    </item>
    <item>
      <title>Betreff: Story level editing with graphical hotspots</title>
      <link>https://community.graphisoft.com/t5/GDL/Story-level-editing-with-graphical-hotspots/m-p/622693#M6900</link>
      <description>&lt;P&gt;Yes, you can create an Array-Parameter for this purpose with different heights for each story. Use UI_INFIELD{2} arry_name[i] in the user interface.&lt;BR /&gt;If z_geschoss is the name of your story-height array parameter, write instead of this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;FOR i = 1 TO 100
	story_z[i] = i * z_geschoss
NEXT i&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;st_hit = 0
FOR i = 1 TO VARDIM1(z_geschoss)
	st_hit = st_hit + z_geschoss[i]
	story_z[i] = st_hit
NEXT i&lt;/LI-CODE&gt;
&lt;P&gt;I hope it works (I did not try)&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2024 11:41:15 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Story-level-editing-with-graphical-hotspots/m-p/622693#M6900</guid>
      <dc:creator>Jochen Suehlo</dc:creator>
      <dc:date>2024-08-14T11:41:15Z</dc:date>
    </item>
    <item>
      <title>Betreff: Story level editing with graphical hotspots</title>
      <link>https://community.graphisoft.com/t5/GDL/Story-level-editing-with-graphical-hotspots/m-p/622697#M6901</link>
      <description>&lt;P&gt;Oh my, that is so simple. It will reduce my code to a fourth of what it is now. Thank you so much!&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2024 11:50:43 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Story-level-editing-with-graphical-hotspots/m-p/622697#M6901</guid>
      <dc:creator>Kaj_AL</dc:creator>
      <dc:date>2024-08-14T11:50:43Z</dc:date>
    </item>
    <item>
      <title>Betreff: Story level editing with graphical hotspots</title>
      <link>https://community.graphisoft.com/t5/GDL/Story-level-editing-with-graphical-hotspots/m-p/622835#M6927</link>
      <description>&lt;P&gt;Hello again!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I changed my parameters into arrays, which worked great for almost everything. However, the hotspots controlling the individual story height now don't align with the actual stories. Any ideas where this issue might come from? I'll attach the code but it might be quite tricky to read. Please ask if I can clarify anything.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Kaj_AL_0-1723722692796.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/70465iB833832DD805DC75/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Kaj_AL_0-1723722692796.png" alt="Kaj_AL_0-1723722692796.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;!floor_height[] is the array I want to control. It can be used if I don't want to use the main height on a level.
!story_height[] is an array of the actual height of each story. Every story_height[] comes from either the floor_height[] or a parameter called main_height.

FOR i=1 TO num_stories
	currentHeight=0
	FOR j=1 TO i
		currentHeight=currentHeight+story_height[i]
	NEXT j
	FOR j=1 TO numNodes-1		
		!Story height hotspots
		unID=unID+1 : HOTSPOT ac_coords[j][2], ac_coords[j][3], currentHeight-story_height[i], unID, floor_height[i], 1 + 128
		unID=unID+1 : HOTSPOT ac_coords[j][2], ac_coords[j][3], currentHeight, unID, floor_height[i], 2
		unID=unID+1 : HOTSPOT ac_coords[j][2], ac_coords[j][3], -1, unID, floor_height[i], 3			

		!Height override hotspots
		unID=unID+1 : HOTSPOT (ac_coords[j][2]+ac_coords[j+1][2])/2, (ac_coords[j][3]+ac_coords[j+1][3])/2, 
			currentHeight-override_height[i], unID, override_height[i], 1 + 128 !base
		unID=unID+1 : HOTSPOT (ac_coords[j][2]+ac_coords[j+1][2])/2, (ac_coords[j][3]+ac_coords[j+1][3])/2, 
			currentHeight, unID, override_height[i], 2 !moving
		unID=unID+1 : HOTSPOT (ac_coords[j][2]+ac_coords[j+1][2])/2, (ac_coords[j][3]+ac_coords[j+1][3])/2, 
			-1, unID, override_height[i], 3 !reference
	NEXT j
NEXT i&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2024 12:01:07 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Story-level-editing-with-graphical-hotspots/m-p/622835#M6927</guid>
      <dc:creator>Kaj_AL</dc:creator>
      <dc:date>2024-08-15T12:01:07Z</dc:date>
    </item>
  </channel>
</rss>

