<?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 Betreff: macro parameters in GDL</title>
    <link>https://community.graphisoft.com/t5/GDL/macro-parameters/m-p/677429#M7982</link>
    <description>&lt;P&gt;Every time you call the macro, you have to pass on different parameter values to the same parameter.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So for the mirror you would call with the parameters&amp;nbsp;ID_X = ID_X_mirror, ID_Y = ID_Y_mirror&lt;/P&gt;
&lt;P&gt;And for the sop dish&amp;nbsp;ID_X = ID_X_soap, ID_Y = ID_Y_soap&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Barry.&lt;/P&gt;</description>
    <pubDate>Mon, 22 Sep 2025 07:44:04 GMT</pubDate>
    <dc:creator>Barry Kelly</dc:creator>
    <dc:date>2025-09-22T07:44:04Z</dc:date>
    <item>
      <title>macro parameters</title>
      <link>https://community.graphisoft.com/t5/GDL/macro-parameters/m-p/677028#M7966</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;It's my first time, when I try using macros and don't understand it workflow.&lt;BR /&gt;I created label as macro and wanted to add it to my host object as several instances&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;label is simple:&lt;BR /&gt;generate text with ID and hotspots which determinate localization of label.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I try to call it in host, it generate error "ID_X is not propper parameter name.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;! Styl czcionki
define style{2} font_style Arial, gs_font_size*5, 1 
style font_style 

! Unikalny paragraf dla ID
ID_paragraph = ID + "_paragraph" 

! Pozycjonowanie tekstu
add2 ID_X, ID_Y
    mul2 1 - 2 * SYMB_MIRRORED, 1
        rot2 -SYMB_ROTANGLE * (SYMB_ROTANGLE &amp;lt;&amp;gt; 0)
        paragraph ID_paragraph 1, 0, 
            0, 0, 1 
            pen font_pen 
            style font_style 
            ID 
        endparagraph
        textblock 'ID_textblock' 0, anchor, 0, 1, 1, 0, 
            ID_paragraph 
        richtext2 0, 0, 'ID_textblock' 
del 3

!----------------------------------------
! Hotspoty do zmiany lokalizacji
!----------------------------------------
hsid = 1
! MACRO LABEL
! Hotspoty w poziomie
hotspot2 0, ID_Y, hsid, ID_X, 1 + 128, ID_X: hsid = hsid + 1
hotspot2 ID_X, ID_Y, hsid, ID_X, 2, ID_X: hsid = hsid + 1
hotspot2 -1, ID_Y, hsid, ID_X, 3, ID_X: hsid = hsid + 1

! Hotspoty w pionie
hotspot2 ID_X, 0, hsid, ID_Y, 1 + 128, ID_Y: hsid = hsid + 1
hotspot2 ID_X, ID_Y, hsid, ID_Y, 2, ID_Y: hsid = hsid + 1
hotspot2 ID_X, -1, hsid, ID_Y, 3, ID_Y: hsid = hsid + 1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;parameters in editor:&lt;BR /&gt;ID, ID_X, ID_Y, gs_font_size, font_pen, anchor, font_style&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;!Host code
!...
call "JA_Etykieta_ID" parameters all,
				ID_X = ID_X_chair,
				ID_Y = ID_Y_chair,
				ID = _chair_ID,
				anchor = 5
!... rest of code&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in parameters i have ID_X_chair, ID_Y_chair, _chair_ID and others&lt;BR /&gt;&lt;BR /&gt;Why it is not working? &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Sep 2025 13:26:35 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/macro-parameters/m-p/677028#M7966</guid>
      <dc:creator>silvermat</dc:creator>
      <dc:date>2025-09-17T13:26:35Z</dc:date>
    </item>
    <item>
      <title>Betreff: macro parameters</title>
      <link>https://community.graphisoft.com/t5/GDL/macro-parameters/m-p/677044#M7968</link>
      <description>&lt;P&gt;You should have the same Parameters in the caller as in the macro. E.g. if you add&amp;nbsp;&lt;SPAN&gt;ID_X and&amp;nbsp;ID_Y as Parameters in the caller, the you will not have this error message, even if you do not use this parameters.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Sep 2025 14:54:37 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/macro-parameters/m-p/677044#M7968</guid>
      <dc:creator>Jochen Suehlo</dc:creator>
      <dc:date>2025-09-17T14:54:37Z</dc:date>
    </item>
    <item>
      <title>Betreff: macro parameters</title>
      <link>https://community.graphisoft.com/t5/GDL/macro-parameters/m-p/677097#M7973</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to use that label multiple times in some objects, E.g. in sink object I add mirror, bin, soap etc.&lt;BR /&gt;Every item has their own ID label with own coords. I don't want create in macro 5 times parameters with coords named "ID_X_mirror", "ID_X_soap" etc.&lt;BR /&gt;because I use that label in desk object where I dont have mirror, soap and so on but chair, box, pc etc.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;second fact is that when I create different hotspots in label with different coords, then it all move same label even if I place it in different location when I move label 1 it move label 2 with one hotspot.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="silvermat_1-1758176704900.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/92091i62CCD3AB65EE1393/image-size/medium?v=v2&amp;amp;px=400" role="button" title="silvermat_1-1758176704900.png" alt="silvermat_1-1758176704900.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="silvermat_2-1758177355828.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/92092i493897FC32A4CCC7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="silvermat_2-1758177355828.png" alt="silvermat_2-1758177355828.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Sep 2025 06:36:20 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/macro-parameters/m-p/677097#M7973</guid>
      <dc:creator>silvermat</dc:creator>
      <dc:date>2025-09-18T06:36:20Z</dc:date>
    </item>
    <item>
      <title>Betreff: macro parameters</title>
      <link>https://community.graphisoft.com/t5/GDL/macro-parameters/m-p/677099#M7974</link>
      <description>&lt;P&gt;It would only need to be ID_X and ID_Y that would be added to the host object, that is overrided with the desired value when you call the macro.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ling.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Sep 2025 06:42:07 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/macro-parameters/m-p/677099#M7974</guid>
      <dc:creator>Lingwisyer</dc:creator>
      <dc:date>2025-09-18T06:42:07Z</dc:date>
    </item>
    <item>
      <title>Betreff: macro parameters</title>
      <link>https://community.graphisoft.com/t5/GDL/macro-parameters/m-p/677426#M7981</link>
      <description>&lt;P&gt;But how can I call my label 2 times in one object when location of it should be different and hotspots should be dynamic?&lt;BR /&gt;&lt;BR /&gt;When I write:&lt;BR /&gt;call "JA_Etykieta_ID", parameters all, ID = ID_desk ID_X = ID_X, ID_Y = ID_Y it create hotspot in ID_X, ID_Y&lt;BR /&gt;&lt;BR /&gt;And when I try to call it again if I call it with the same parameters, it apears in the same place&lt;/P&gt;&lt;P&gt;call "JA_Etykieta_ID", parameters all, ID = ID_chair, ID_X = ID_X, ID_Y = ID_Y it create hotspot in ID_X, ID_Y&lt;/P&gt;&lt;P&gt;I can't move just one of them.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Sep 2025 07:27:19 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/macro-parameters/m-p/677426#M7981</guid>
      <dc:creator>silvermat</dc:creator>
      <dc:date>2025-09-22T07:27:19Z</dc:date>
    </item>
    <item>
      <title>Betreff: macro parameters</title>
      <link>https://community.graphisoft.com/t5/GDL/macro-parameters/m-p/677429#M7982</link>
      <description>&lt;P&gt;Every time you call the macro, you have to pass on different parameter values to the same parameter.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So for the mirror you would call with the parameters&amp;nbsp;ID_X = ID_X_mirror, ID_Y = ID_Y_mirror&lt;/P&gt;
&lt;P&gt;And for the sop dish&amp;nbsp;ID_X = ID_X_soap, ID_Y = ID_Y_soap&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Barry.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Sep 2025 07:44:04 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/macro-parameters/m-p/677429#M7982</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2025-09-22T07:44:04Z</dc:date>
    </item>
    <item>
      <title>Betreff: macro parameters</title>
      <link>https://community.graphisoft.com/t5/GDL/macro-parameters/m-p/677447#M7984</link>
      <description>&lt;P&gt;I did that, but that doesn't work properly.&lt;BR /&gt;When I try to move second label with it hotspot, it move first label instead.&lt;/P&gt;
&lt;P&gt;Actually I've change textblock to print hsid instead of ID so I can see if there is any collision.&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="silvermat_3-1758534716499.png" style="width: 300px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/92213i7D4A756FE45F4AB3/image-dimensions/300x173?v=v2" width="300" height="173" role="button" title="silvermat_3-1758534716499.png" alt="silvermat_3-1758534716499.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is my code and params. Hope you can find any mistakes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Parent code:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;! -------------------------------------------------------------------------------------------------
! Variables
_bSuccess = LIBRARYGLOBAL("ZZZ_Janowicz Architekci - ORM", "JA_show_eq", _eq_MVO)
_bSuccess = LIBRARYGLOBAL("ZZZ_Janowicz Architekci - ORM", "JA_show_id", _id_MVO)

! -------------------------------------------------------------------------------------------------

! define style{2} "JA_font_style_1" Arial, gs_font_size*5, 1
! style 'JA_font_style_1'
pen gs_cont_pen
fill gs_fill_type


gosub "draw box"
rot2 -30
add2 A/6,	B/4
gosub "energy"
del 2
gosub "description"

gosub "hotspots"

! ==================================================================================================
end ! end ! end ! end ! end ! end ! end ! end ! end ! end ! end ! end ! end ! end ! end ! end ! end
! ==================================================================================================
! ==================================================================================================
"draw box":
! ==================================================================================================

	poly2_b 4,	7,
		gs_fill_pen, gs_back_pen,
		0,	0,	1,
		0,	B,	1,
		A,	B,	1,
		A,	0,	1

	line2	0,	0,	A,	B
	line2	A,	0,	0,	B

	
return
! ==================================================================================================
"energy":
! ==================================================================================================
	poly2 4,	1,
		0,	0,
		0,	B*3/5,
		0.05,	B*3/5 - 0.05,
		0.05,	B-0.05

	poly2_b 3,	7,
		gs_cont_pen, gs_cont_pen,
		0,	0,	1,
		-0.025,	0.1,	1,
		0.025,	0.1,	1
	
return
! ==================================================================================================
"description":
! ==================================================================================================
	hsid = 20
	call "JA_Etykieta_ID" parameters all,
		ID = GLOB_ID,
		hsid = hsid + 7,
		returned_parameters hsid

	call "JA_Etykieta_ID", parameters all, 
		ID = "soap", 
		ID_X = ID_X_soap, 
		ID_Y = ID_Y_soap, 
		hsid = hsid + 7, 
		returned_parameters hsid
	call 'Z_C_K' parameters all
return

! ==================================================================================================
"hotspots":
! ==================================================================================================
	hotspot2 0,	0,	hsid : hsid = hsid + 1
	hotspot2 A,	0,	hsid : hsid = hsid + 1
	hotspot2 A,	B,	hsid : hsid = hsid + 1
	hotspot2 0,	B,	hsid : hsid = hsid + 1
	

	
return&lt;/LI-CODE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="silvermat_0-1758534614700.png" style="width: 720px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/92210i961B65C5417E01F1/image-dimensions/720x1148?v=v2" width="720" height="1148" role="button" title="silvermat_0-1758534614700.png" alt="silvermat_0-1758534614700.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Label code:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;! Styl czcionki
define style{2} font_style Arial, gs_font_size*5, 1 
style font_style 

! Unikalny paragraf dla ID
ID_paragraph = ID + "_paragraph" 

! Pozycjonowanie tekstu
add2 ID_X, ID_Y
    mul2 1 - 2 * SYMB_MIRRORED, 1
        rot2 -SYMB_ROTANGLE * (SYMB_ROTANGLE &amp;lt;&amp;gt; 0)
        paragraph ID_paragraph 1, 0, 
            0, 0, 1 
            pen font_pen 
            style font_style 
            ! ID 
			str(hsid, 2	,	0)
        endparagraph
        textblock 'ID_textblock' 0, anchor, 0, 1, 1, 0, 
            ID_paragraph 
        richtext2 0, 0, 'ID_textblock' 
del 3

!----------------------------------------
! Hotspoty do zmiany lokalizacji
!----------------------------------------
! hsid = 1

! Hotspoty w poziomie
	h_local = hsid
	nHot = 0

	hotspot2 0,     ID_Y,  h_local+nHot, ID_X, 1+128, ID_X : nHot = nHot + 1
	hotspot2 ID_X,  ID_Y,  h_local+nHot, ID_X, 2,     ID_X : nHot = nHot + 1
	hotspot2 -1,    ID_Y,  h_local+nHot, ID_X, 3,     ID_X : nHot = nHot + 1

	hotspot2 ID_X, 0,      h_local+nHot, ID_Y, 1+128, ID_Y : nHot = nHot + 1
	hotspot2 ID_X, ID_Y,   h_local+nHot, ID_Y, 2,     ID_Y : nHot = nHot + 1
	hotspot2 ID_X, -1,     h_local+nHot, ID_Y, 3,     ID_Y : nHot = nHot + 1
	hsid = h_local + nHot
end hsid&lt;/LI-CODE&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="silvermat_1-1758534628142.png" style="width: 720px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/92211i58D5AF5E8EE6739D/image-dimensions/720x757?v=v2" width="720" height="757" role="button" title="silvermat_1-1758534628142.png" alt="silvermat_1-1758534628142.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Oct 2025 17:59:26 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/macro-parameters/m-p/677447#M7984</guid>
      <dc:creator>silvermat</dc:creator>
      <dc:date>2025-10-03T17:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: macro parameters</title>
      <link>https://community.graphisoft.com/t5/GDL/macro-parameters/m-p/678671#M8021</link>
      <description>&lt;P&gt;Is there anyone who can help me?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Oct 2025 06:27:52 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/macro-parameters/m-p/678671#M8021</guid>
      <dc:creator>silvermat</dc:creator>
      <dc:date>2025-10-02T06:27:52Z</dc:date>
    </item>
    <item>
      <title>Re: macro parameters</title>
      <link>https://community.graphisoft.com/t5/GDL/macro-parameters/m-p/679383#M8037</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It wasn't clear if you have assigned different hotspots for each label. And don't think you can define the hostpots in the child, need to be in parent, you could make it an array in the parent to be tidy. ID_X[][3], ID_Y[][3]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The macro call places the child object using the parameters (or values) assigned to it. If you want to call the same macro twice and act independently they need to use different parameters in the parent object.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So in your parent object you need different X and Y parameters for each label. Then when you call the label you assign the parent hotspot to the child. So...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;!!!!!!!!!!!!!!!!Parent (object)
! parameters
! ID_X_soap
! ID_Y_soap
! ID_X_Shampoo
! ID_Y_Shampoo

nHot = 1

hotspot2 0,     ID_Y_soap,  nHot, ID_X_soap, 1+128, ID_X_soap : nHot = nHot + 1
hotspot2 ID_X_soap,  ID_Y_soap,  nHot, ID_X_soap, 2,     ID_X_soap : nHot = nHot + 1
hotspot2 -1,    ID_Y_soap,  nHot, ID_X_soap, 3,     ID_X_soap : nHot = nHot + 1

hotspot2 ID_X_soap, 0,      nHot, ID_Y_soap, 1+128, ID_Y_soap : nHot = nHot + 1
hotspot2 ID_X_soap, ID_Y_soap,   nHot, ID_Y_soap, 2,     ID_Y_soap : nHot = nHot + 1
hotspot2 ID_X_soap, -1,     nHot, ID_Y_soap, 3,     ID_Y_soap : nHot = nHot + 1

call "JA_Etykieta_ID", 
  ID = "soap", 
  ID_X = ID_X_soap, 
  ID_Y = ID_Y_soap, 
  hsid = hsid + 7, 
  returned_parameters hsid

hotspot2 0,     ID_Y_Shampoo,  nHot, ID_X_Shampoo, 1+128, ID_X_Shampoo : nHot = nHot + 1
hotspot2 ID_X_Shampoo,  ID_Y_soap,  nHot, ID_X_Shampoo, 2,     ID_X_Shampoo : nHot = nHot + 1
hotspot2 -1,    ID_Y_Shampoo,  nHot, ID_X_Shampoo, 3,     ID_X_Shampoo : nHot = nHot + 1

hotspot2 ID_X_Shampoo, 0,      nHot, ID_Y_Shampoo, 1+128, ID_Y_Shampoo : nHot = nHot + 1
hotspot2 ID_X_Shampoo, ID_Y_Shampoo,   nHot, ID_Y_Shampoo, 2,     ID_Y : nHot = nHot + 1
hotspot2 ID_X_Shampoo, -1,     nHot, ID_Y_Shampoo, 3,     ID_Y_Shampoo : nHot = nHot + 1

call "JA_Etykieta_ID", 
  ID = "shampoo", 
  ID_X = ID_X_shampoo, 
  ID_Y = ID_Y_shampoo, 
  hsid = hsid + 7, 
  returned_parameters hsid

!!!!!!!!!!!!!!!Child object (label)
! parameters
! ID
! ID_X
! ID_Y
! hsid

......

richtext2 ID_X, ID_Y, 'ID_textblock' &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Oct 2025 02:30:05 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/macro-parameters/m-p/679383#M8037</guid>
      <dc:creator>easyDoesIt</dc:creator>
      <dc:date>2025-10-10T02:30:05Z</dc:date>
    </item>
  </channel>
</rss>

