accessing hidden partlistrows

accessing hidden partlistrows

Anonymous
Not applicable
487 Views
3 Replies
Message 1 of 4

accessing hidden partlistrows

Anonymous
Not applicable

hi

 

is there a way to access a hidden partlistrow or the visible partlist row??

 

0 Likes
Accepted solutions (1)
488 Views
3 Replies
Replies (3)
Message 2 of 4

rjay75
Collaborator
Collaborator

Check the visible property on a PartsListRow to see if it is Hidden or visible.

0 Likes
Message 3 of 4

Anonymous
Not applicable
how can i check it?

i can hide some of the rows of the partlist programmatically.
my problem is what is the code to access the visible/hidden rows in the partlist programmatically.
0 Likes
Message 4 of 4

rjay75
Collaborator
Collaborator
Accepted solution

There's no difference in access to hidden or visible rows. Here's some code that cycles through all the rows and counts the hidden and visible rows.

 

Dim hiddenRowCnt As Long
Dim visibleRowCnt As Long
Dim dwgDoc As DrawingDocument
Dim prtList As PartsList

dwgDoc = ThisDoc.Document
If dwgDoc.ActiveSheet.PartsLists.Count > 0 Then
	prtList = dwgDoc.ActiveSheet.PartsLists.Item(1)
	Dim prtListRow As PartsListRow
	For Each prtListRow In prtList.PartsListRows
		If prtListRow.Visible Then
			visibleRowCnt = visibleRowCnt + 1
		Else
			hiddenRowCnt = hiddenRowCnt + 1
		End If
	Next
	MessageBox.Show(String.Format("Rows:" + vbCrLf + "Hidden: {0}" + vbCrLf + "Visible: {1}", hiddenRowCnt, visibleRowCnt))
End If

 All the rows are in on collection called PartsListRows. Hidden and visible. Visible Property gets or sets whether the row is hidden or visible.

 

So in this example the prtListRow.Visible will be true or false for visible if true or hidden if false.

 

 

0 Likes