Get parameter values and set in multiple lists
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
‘I have two parameters in two subassemblies:
'Controlling values in sub assemblies
Values = Parameter("C1 Right Framework - Lower:1", "LowerDoor")
Values = Parameter("C1 Upper Framework - Upper Master:1", "UpperDoor")
'Based on the value in the sub assemblies, I want to find which list has the same value and set it.
'Get all four door variation lists
'("DoorLowerA", "0","AA","BB","CC","DD","EE","FF","II","JJ","KK","LL","OO","PP","QQ")
values = MultiValue.List("DoorLowerA")
'("DoorUpperB", "0","A","B","C","D","E","F","I","J","K","L","O","P")
values = MultiValue.List("DoorUpperB")
'("DoorLowerC", "0","GG","HH","MM","NN")
values = MultiValue.List("DoorLowerC")
'("DoorUpperD ", "0","G","H","M","N")
values = MultiValue.List("DoorUpperD")
'Parameter "LowerDoor" and "UpperDoor" has a value - If it is found in any of these lists then the list with the value needs to be set to match the value or set it to 0.
If foundVal = MultiValue.FindValue(MultiValue.List ("DoorLowerA",)) "=" Parameter("C1 Right Framework - Lower:1", "LowerDoor") AndAlso
foundVal = MultiValue.FindValue(MultiValue.List ("DoorUpperB")) "=" Parameter("C1 Upper Framework - Upper Master:1", "UpperDoor") Then
Component.IsActive("Front Panel Assembly E2E4 Both 1")= True
ElseIf foundVal = MultiValue.FindValue(MultiValue.List("DoorLowerA"))"=" Parameter("C1 Right Framework - Lower:1", "LowerDoor")AndAlso
foundVal = MultiValue.FindValue(MultiValue.List("DoorUpperB")) “=” Parameter("C1 Upper Framework - Upper Master:1", "UpperDoor") Then
Component.IsActive("Front Panel Assembly E6 Both 1")= True
ElseIf foundVal = MultiValue.FindValue(MultiValue.List("DoorLowerA")) "=" Parameter("C1 Right Framework - Lower:1", "LowerDoor")AndAlso
foundVal = MultiValue.FindValue(MultiValue.List("DoorUpperB")) “=” Parameter("C1 Upper Framework - Upper Master:1", "UpperDoor")Then
Component.IsActive("Front Panel Assembly E6 Upper 1")= True
ElseIf foundVal = MultiValue.FindValue(MultiValue.List("DoorLowerA")) "=” Parameter("C1 Right Framework - Lower:1", "LowerDoor")AndAlso
foundVal = MultiValue.FindValue(MultiValue.List("DoorUpperB")) “=” Parameter("C1 Upper Framework - Upper Master:1", "UpperDoor")Then
Component.IsActive("Front Panel Assembly E6 Lower 1")= True
End If
'various Errors: Argument not specified for parameter 'operatorStr' of 'Public Function FindValue(valList As System.Collections.ICollection, operatorStr As String, valA As Object, [tolerance As Double = 0.0000001]) As Object'.
Clearly my syntax is wrong here. I am not a good enough coder to adapt the various cycle through the lists and find type rules and make them work.
Any help would be appreciated.
Tracey