03-31-2023
07:24 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
03-31-2023
07:24 AM
Here is another similar exploratory iLogic rule you can play around with. In this example, the oRow.Item() property is looking for either an Index Integer or the iPartTableColumn.Heading value as the input to specify which cell in that row you want. What you see in the regular iPart table dialog for the column headers is like the value of the iPartTableColumn.DisplayHeading property value, but that can be different from the iPartTableColumn.Heading property value, which includes the extra stuff.
Dim oPDoc As PartDocument = ThisDoc.Document
Dim oPDef As PartComponentDefinition = oPDoc.ComponentDefinition
Dim oFactory As iPartFactory = oPDef.iPartFactory
Dim oRow As iPartTableRow = oFactory.DefaultRow
Dim oCols As iPartTableColumns = oFactory.TableColumns
For Each oCol As iPartTableColumn In oCols
Dim oCell As iPartTableCell = oRow.Item(oCol.Heading)
Dim oValue As String = oCell.Value 'the Value is always a String
'oCol.DisplayHeading, oCol.FormattedHeading, oCol.Heading, oCol.Index
MsgBox("Column DisplayHeading = " & oCol.DisplayHeading & vbCrLf & _
"Column Heading = " & oCol.Heading & vbCrLf & _
"Column Index = " & oCol.Index & vbCrLf & _
"Cell.Value = " & oCell.Value, vbInformation, "iPart Table Data")
If oCol.DisplayHeading = "Part Number" Then
MsgBox("This member's Part Number is: " & oCell.Value,,"")
End If
Next
Wesley Crihfield
(Not an Autodesk Employee)