<?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: Adding multiple Objects to GSM Object? in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/Adding-multiple-Objects-to-GSM-Object/m-p/576129#M44443</link>
    <description>&lt;P&gt;Friend: This is my appropriate editing based on the built-in switch of AC, according to Chinese standards, which may meet your requirements for your reference&lt;/P&gt;</description>
    <pubDate>Sat, 18 Nov 2023 12:53:06 GMT</pubDate>
    <dc:creator>baixiaodong</dc:creator>
    <dc:date>2023-11-18T12:53:06Z</dc:date>
    <item>
      <title>Adding multiple Objects to GSM Object?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Adding-multiple-Objects-to-GSM-Object/m-p/396768#M44169</link>
      <description>&lt;P&gt;Hi, I am trying to create a new light switch object that works with my Electrical Legend ( I know there is one created in archicad, but it doesnt work the way I would like) I am trying to create one object that can switch between 1, 2, 3 &amp;amp; 4 switches. I have created the. '1 switch' but cannot work out how to add the others in.&lt;/P&gt;
&lt;P&gt;I have attached a screen grab on another object I have that shows what I am trying to achieve, any help would be greatly appreciated.&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="Screenshot 2023-08-31 at 9.09.23 am.png" style="width: 799px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/49345i7AE9CF8E16E941B2/image-dimensions/799x621?v=v2" width="799" height="621" role="button" title="Screenshot 2023-08-31 at 9.09.23 am.png" alt="Screenshot 2023-08-31 at 9.09.23 am.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2023 19:45:57 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Adding-multiple-Objects-to-GSM-Object/m-p/396768#M44169</guid>
      <dc:creator>MikeRaats_FOX</dc:creator>
      <dc:date>2023-11-21T19:45:57Z</dc:date>
    </item>
    <item>
      <title>Re: Adding multiple Objects to GSM Object?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Adding-multiple-Objects-to-GSM-Object/m-p/396769#M44170</link>
      <description>&lt;P&gt;If you want multiple choices, then it is not a matter of just saving a selection to create an object.&lt;/P&gt;
&lt;P&gt;You will need to get into scripting.&lt;/P&gt;
&lt;P&gt;You can use FRAGMENTs if there are just a few options - one fragment for each 2D symbol, you can have up to 16 fragments.&lt;/P&gt;
&lt;P&gt;But if there are going to be many then you will need to start using sub-routines for each type.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you can script in GDL, you should know what I am talking about.&lt;/P&gt;
&lt;P&gt;If you can't script in GDL, prepare to put in a fair few hours to learn.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Barry.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2023 06:40:42 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Adding-multiple-Objects-to-GSM-Object/m-p/396769#M44170</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2023-08-31T06:40:42Z</dc:date>
    </item>
    <item>
      <title>Re: Adding multiple Objects to GSM Object?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Adding-multiple-Objects-to-GSM-Object/m-p/396787#M44172</link>
      <description>&lt;P&gt;Add parameter in "Parameters" as in the snip attached.&lt;BR /&gt;Add below line to your "Parameter" script:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;VALUES "switchType" "1 Switch", "2 Switch", "3 Switch", "4 Switch"&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;From here in 2D and 3D script you can use gosub&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;GOSUB switchType
END

"1 Switch":
!your code
RETURN

"2 Switch":
!your code
RETURN&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="Screenshot 2023-08-31 162525.jpg" style="width: 999px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/45430i9987A68DAB2555FB/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2023-08-31 162525.jpg" alt="Screenshot 2023-08-31 162525.jpg" /&gt;&lt;/span&gt;&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="Screenshot 2023-08-31 163143.jpg" style="width: 999px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/45431iF3AAB0520B6369EE/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2023-08-31 163143.jpg" alt="Screenshot 2023-08-31 163143.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;  &lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2023 04:02:23 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Adding-multiple-Objects-to-GSM-Object/m-p/396787#M44172</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-09-06T04:02:23Z</dc:date>
    </item>
    <item>
      <title>Re: Adding multiple Objects to GSM Object?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Adding-multiple-Objects-to-GSM-Object/m-p/576129#M44443</link>
      <description>&lt;P&gt;Friend: This is my appropriate editing based on the built-in switch of AC, according to Chinese standards, which may meet your requirements for your reference&lt;/P&gt;</description>
      <pubDate>Sat, 18 Nov 2023 12:53:06 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Adding-multiple-Objects-to-GSM-Object/m-p/576129#M44443</guid>
      <dc:creator>baixiaodong</dc:creator>
      <dc:date>2023-11-18T12:53:06Z</dc:date>
    </item>
    <item>
      <title>Re: Adding multiple Objects to GSM Object?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Adding-multiple-Objects-to-GSM-Object/m-p/576136#M44444</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/67765"&gt;@MikeRaats_FOX&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Adding to all the replies, you could also do an ENUM style scripting.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Using an integer type parameter that we'll call "&lt;STRONG&gt;type_Switch&lt;/STRONG&gt;"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. In Main script, we create the variables to integers and use an array to label them easily&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="php"&gt;SWITCH_1 = 1
SWITCH_2 = 2
SWITCH_3 = 3
SWITCH_4 = 4

dim name_SWITCH[4]
	name_SWITCH[1] = "Name of switch 1"
	name_SWITCH[2] = "Name of switch 2"
	name_SWITCH[3] = "Name of switch 3"
	name_SWITCH[4] = "Name of switch 4"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. In Parameter script, we link the integers to the labels&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="php"&gt;values{2} "type_Switch"	SWITCH_1, name_SWITCH[SWITCH_1],
						SWITCH_2, name_SWITCH[SWITCH_2],
						SWITCH_3, name_SWITCH[SWITCH_3],
						SWITCH_4, name_SWITCH[SWITCH_4]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;4. In the 2D and/or 3D scripts, we go to the part of the code according to the value of the &lt;STRONG&gt;type_Switch&lt;/STRONG&gt; parameter :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="php"&gt;gosub 10000 + type_Switch ! adding 10000 to give the switch choices a unique ID

end

10001: ! 10000 + SWITCH_1
    ! Code for 1st switch
return

10002: ! 10000 + SWITCH_2
    ! Code for 2nd switch
return

...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 18 Nov 2023 14:55:52 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Adding-multiple-Objects-to-GSM-Object/m-p/576136#M44444</guid>
      <dc:creator>MF BIM</dc:creator>
      <dc:date>2023-11-18T14:55:52Z</dc:date>
    </item>
  </channel>
</rss>

