Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
Hi,
... I also posted this in "Assembly Design" group on an old thread revival (link)
I get into a problem with the VB API and I cannot figure out, using this code:
Private Function GetCellText(TheTable As IpfcTable, rIdx As Integer, cIdx As Integer) As String
Try
Debug.Print("Number of lines in table: " & TheTable.GetRowCount)
Debug.Print("Number of columns in table: " & TheTable.GetColumnCount)
Dim MyCell As IpfcTableCell = (New CCpfcTableCell).Create(rIdx, cIdx)
Dim MyText As Cstringseq = TheTable.GetText(MyCell, 0)
Return MyText(0).ToString
Catch ex As Exception
MsgBox(ex.Message & vbNewLine & vbNewLine & ex.StackTrace,, GetCurrentMethod().Name)
Return Nothing
End Try
End Function
I get an exception from xToolkit at the line "Dim MyText As Cstringseq = TheTable.GetText(MyCell, 0)" but I can't find what I am doing wrong.
Any idea?
Solved! Go to Solution.
The code I posted earlier works fine .... as long as you use the right version of Visual Studio !!!
Darn, I was using VS2017 ... now in VS2015 it works fine. I forgot about those version compatibility !!!
The code I posted earlier works fine .... as long as you use the right version of Visual Studio !!!
Darn, I was using VS2017 ... now in VS2015 it works fine. I forgot about those version compatibility !!!