Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

accessing hidden partlistrows

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
Anonymous
392 Views, 3 Replies

accessing hidden partlistrows

hi

 

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

 

3 REPLIES 3
Message 2 of 4
rjay75
in reply to: Anonymous

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

Message 3 of 4
Anonymous
in reply to: rjay75

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.
Message 4 of 4
rjay75
in reply to: Anonymous

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.

 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report