Hi, is there a way to count the number of columns in a revision table?
I'm using the following to get the column number, and I'm wondering if there is a way to check the total number of columns because I want to set the value to a negative number if there is no match so I can handle this scenario in a later part of the program. Didn't see
'REVTABLE - this is the revision table on the current sheet
Private Property Get REVTABLE() As SldWorks.RevisionTableAnnotation
Set REVTABLE = DOC.GetCurrentSheet.RevisionTable
End Property
'REVDESCCOL - this is a long value representing the column which holds the revision description
Private Property Get RevDescCol() As Long
Dim lngX As Long
While UCase(REVTABLE.Text(1, lngX)) <> "DESCRIPTION"
lngX = lngX + 1
'HERE: I want to set set lngx=-1 if we've reached the last column, and exit the while loop
Wend
RevDescCol = lngX
End Property
SolidworksApi macros