Announcements

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

Conditional Formatting of Revision Table

youann21700
Advocate

Conditional Formatting of Revision Table

youann21700
Advocate
Advocate

I am trying to improve the formatting of our revision tables. For drawings not issues for manufacture or use of material sourcing, we use letter revisions (i.e. A, B, C etc), once drawings are released to clients, we use revisions numbers from 0. 

Once the switch is made, I want to hide the letter revision rows. I have attached the snippet of code i am using,

		Dim oRevTable As RevisionTable
									Try
										oRevTable = ThisDoc.Document.ActiveSheet.RevisionTables.Item(1)
									Catch
										oRevTable = ThisDoc.Document.Sheets.Item(1).RevisionTables.Item(1)
									End Try
									Dim oRows As RevisionTableRows = oRevTable.RevisionTableRows
									oRevRowCount = oRevTable.RevisionTableRows.Count
									For i = 1 To oRevRowCount
										Dim oCell As RevisionTableCell = oRevTable.RevisionTableRows.Item(i).Item(1)
										Dim oCellCont As String = oCell.ToString
										If IsNumeric(oCellCont) = False
											oRows(i).Visible = False
											Else
												oRows(i).Visible = True
										End If
									Next

 it does not seem to differentiate between numeric and non-numeric revision labels. When the snippet is run, both rows in the picture below are made invisible.

youann21700_0-1730209006901.png

 

0 Likes
Reply
Accepted solutions (1)
113 Views
1 Reply
Reply (1)

jnowel
Advocate
Advocate
Accepted solution

change your oCellCont definition as oCell is still a RevisionTableCell Object and not the text value it contains

Dim oCellCont As String = oCell.Text

 

0 Likes