Message 1 of 6
Problem with subassembly's in mainassembly (selction multivalue)

Not applicable
01-19-2021
06:28 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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