Without knowing anything at all about your iAssembly, what value to check, what column to find, or how to find the row in the table that matches the search criteria, I just created an iLogic rule example with two things in mind. This code expects that the document currently showing on your screen when this rule starts is the main iAssembly factory document. Then it expects there to be a column within the iAssembly configuration table with the heading "VOLTAGE". Then it expects to find a row within that table, where the value for that row, in that column is "24". If any of these are not true, the code will fail.
'make sure we are working with an assembly (not a part or drawing)
Dim oADoc As AssemblyDocument = TryCast(ThisDoc.Document, Inventor.AssemblyDocument)
If oADoc Is Nothing Then
MsgBox("The iLogic rule named '" & iLogicVb.RuleName & _
"' exited, because it did not obtain a reference to an assemby.", vbCritical, "iLogic")
Return 'this will exit this iLogic rule
End If
Dim oADef As AssemblyComponentDefinition = oADoc.ComponentDefinition
'figure out if this assembly is just a regular assembly, or an iAssemblyFactory, or an iAssemblyMember.
Dim oFactory As iAssemblyFactory = Nothing
If oADef.IsiAssemblyFactory Then
oFactory = oADef.iAssemblyFactory
ElseIf oADef.IsiAssemblyMember Then
Dim oMember As iAssemblyMember = oADef.iAssemblyMember
oFactory = oMember.ParentFactory
End If
If oFactory Is Nothing Then
MsgBox("This assembly is not an iAssembly factory, and a reference to an iAssembly factory could not be obtained.", _
vbCritical, "iLogic")
Return 'this will exit this iLogic rule
End If
'try to find the table column containing the variable we are looking for (voltage)
Dim oCols As iAssemblyTableColumns = oFactory.TableColumns
Dim oVoltageColumn As iAssemblyTableColumn = Nothing
For Each oCol As iAssemblyTableColumn In oCols
If oCol.DisplayHeading = "VOLTAGE" Then
oVoltageColumn = oCol
Exit For
End If
Next oCol
If oVoltageColumn Is Nothing Then
MsgBox("Could not find a column in the iAssembly table named 'VOLTAGE'.", vbCritical, "iLogic")
Return 'this will exit this iLogic rule
End If
'try to find the table row which has a specific value in that one column we found earlier
Dim oRows As iAssemblyTableRows = oFactory.TableRows
Dim oMatchingRow As iAssemblyTableRow = Nothing
For Each oRow As iAssemblyTableRow In oRows
If oRow.Item(oVoltageColumn).Value = "24" Then
oMatchingRow = oRow
Exit For
End If
Next oRow
If oMatchingRow Is Nothing Then
MsgBox("Could not find a row in the iAssembly table where the value in its 'VOLTAGE' column was 24.", vbCritical, "iLogic")
Return 'this will exit this iLogic rule
End If
oFactory.DefaultRow = oMatchingRow
oADoc.Update2(True)
Wesley Crihfield

(Not an Autodesk Employee)