cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

VB API get the text from a drawing table cell

SOLVED
Highlighted
Regular Member

VB API get the text from a drawing table cell

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.

image.png

Any idea?

Tags (2)
1 ACCEPTED SOLUTION

Accepted Solutions

Re: VB API get the text from a drawing table cell

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 !!!

View solution in original post

1 REPLY 1

Re: VB API get the text from a drawing table cell

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 !!!

View solution in original post

Announcements