Hi @donald_leigh
You need to loop over the family rows again in order to get the row object of the size value selected. This is because you select the size after the first row loop and have no way to reference the row again.
iLogicVb.UpdateWhenDone = True
MultiValue.SetValueOptions(True, DefaultIndex := 0)
If NutType = "Plain Nut" Then
NutChild = "Hex"
Else
NutChild = "Locking Nuts"
End If
'CC Family Name
If NutType = "Plain Nut" Then
If Material = "Black (Plain)" Or Material = "Zinc Plated" Then
NutTypeName = "HEX NUT"
Else If Material = "G304" Or Material = "G316" Then
NutTypeName = "HEX NUT - S/S"
End If
Else
If Material = "Black (Plain)" Or Material = "Zinc Plated" Then
NutTypeName = "HEX NYLOC NUT"
Else If Material = "G304" Or Material = "G316" Then
NutTypeName = "HEX NYLOC NUT - S/S"
End If
End If
Components.ContentCenterLanguage = "en-US"
Dim oC As ContentCenter = ThisApplication.ContentCenter
Dim oCN As ContentTreeViewNode = oC.TreeViewTopNode
'CC Folders
oCN = oCN.ChildNodes.Item("Fasteners").ChildNodes.Item("Nuts").ChildNodes.Item(NutChild)
Dim oColumn As ContentTableColumn
Dim oRow As ContentTableRow
Dim oFam As ContentFamily
Dim oChosenFamily As ContentFamily
Dim FamName As String = NutTypeName
Dim sCol1 As String = "SIZE_SEL"
Dim sCol2 As String = "KOH"
Dim Val1 As String
Dim thick As String
Dim List1 As New ArrayList
For Each oFam In oCN.Families
If oFam.DisplayName = FamName Then
oChosenFamily = oFam
For Each oRow In oFam.TableRows
Val1 = oRow.GetCellValue(sCol1)
If Not List1.Contains(Val1) Then
List1.Add(Val1)
End If
Next
End If
Next
Val1 = InputListBox("Select " & sCol1, List1, "", "Content Center Part - " & FamName)
If Val1 = "" Then Return
MessageBox.Show(Val1, "Title")
For Each oRow In oChosenFamily.TableRows
If oRow.GetCellValue(sCol1) = Val1 Then
thick = oRow.GetCellValue(sCol2)
Logger.Info("Index " & oRow.Index)
Logger.Info(thick)
End If
Next
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'After Selecting the Nut Size I would like to be able to return the Thickness of that size Nut. This is referenced by the "KOH" parameter
If Material = "Black (Plain)" Or Material = "Zinc Plated" Then
Dim Nut = Components.AddContentCenterPart("Nut",
"Fasteners:Nuts:" & NutChild,
NutTypeName,
{"Grade", "PC10", "Finish", Material, "SIZE_SEL", BoltSize})
Else
Dim Nut = Components.AddContentCenterPart("Nut",
"Fasteners:Nuts:" & NutChild,
NutTypeName,
{"Grade", Material, "SIZE_SEL", BoltSize })
End If
If this solved a problem, please click (accept) as solution.
Or if this helped you, please, click (like)
Regards
Alan