Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
Anonymous
394 Views, 5 Replies

Problem with subassembly's in mainassembly (selction multivalue)

Hello,

i wrote the code below of this text. The function should be:
Slotkeuze is a multivalue parameter and selects the users input of Forty, Fifty or Sixt.
The user can make a selection.
In the assembly are three IAM-files, (Forty, Fifty and Sixty).
The problem is that if i run the rule two of the assembly's are deleted from the file.
I don't know why this happens, hopefully someone can explain me why this is happening.

Thanks, Joop

The code is:

If
SlotKeuze = "Forty" Then Dim componentA = Components.Add("Forty:1", "Forty.iam", position := Nothing, grounded := False, visible := True, appearance := Nothing) Components.Delete("Fifty:1") Components.Delete("Sixty:1") ElseIf SlotKeuze = "Fifty" Then Dim componentA = Components.Add("Fifty:1", "Fifty.iam", position := Nothing, grounded := False, visible := True, appearance := Nothing) Components.Delete("Forty:1") Components.Delete("Sixty:1") ElseIf SlotKeuze = "Sixty" Then Dim componentA = Components.Add("Sixty:1", "Sixty.iam", position := Nothing, grounded := False, visible := True, appearance := Nothing) Components.Delete("Forty:1") Components.Delete("Fifty:1") End If