Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
arkelec
in reply to: WCrihfield

Thanks @WCrihfield

 

What is the syntax for accessing the other columns in the Table?

The original from your post:

 

Dim oCell As iPartTableCell = oRow.Item("Member")

 

 

Here's a section of the Table showing some of the headings:

iPart Table.png

 

Replacing "Member" in the code below with one of the other Table column headings results in an error:

 

Dim oCell As iPartTableCell = oRow.Item("Part Number")
Dim oCell As iPartTableCell = oRow.Item("c_Part_Nº")
Dim oCell As iPartTableCell = oRow.Item("Stock Number")

 

 

This is the full code (I changed line 4 to use the member selected):

 

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 oCell As iPartTableCell = oRow.Item("c_Part_Nº") '"Member" is the Heading of the iPartTableColumn
Dim oMember As String = oCell.Value
MsgBox("oMember = " & oMember, vbInformation, "iPart Row Member")

 

 

 

And also thanks @Michael.Navara 

As you can see from my question above, I'm still struggling a bit on the structure & how the function works.

I'll try your code once I've understood the issue above.