Dim oDoc As Document = ThisDoc.Document
Dim osheet As Sheet = oDoc.Activesheet
Dim oView As DrawingView = osheet.DrawingViews(1)
Dim RefDoc As Document = oView.ReferencedDocumentDescriptor.ReferencedDocument
Dim OriginDoc As Document= RefDoc.ReferencedDocuments(1)
Dim oFactory As iPartFactory = OriginDoc.ComponentDefinition.iPartFactory
Dim oMemberList As New ArrayList
For i As Integer = 1 To OriginDoc.componentdefinition.iPartFactory.TableRows.Count
oMember = OriginDoc.componentdefinition.iPartFactory.TableRows.Item(i).MemberName
oMemberList.Add(oMember)
Next
Dim oValue As String = InputListBox("Select Member", oMemberList, oMemberList(0), "Ilogic", "Available Members")
If oValue = "" Then Exit Sub
On Error Resume Next
oView.ActiveMemberName = oValue Hi, Here I share an ilogic code. It seemed to be a simple task but the truth gave me headaches.
Try to generate a list box with the contents of the ranks of ipart members. To achieve this, I had to take the reference document and here there was a problem, open the derivative document, the one that does not have the table, then it is necessary to refer again to the document of origin of the ipart. Then all the members of ipart must be generated and saved, because if they are not saved, they will not be able to change the reference in the view.
I hope I have been clear and that the code is useful for you. regards
Please accept as solution and give likes if applicable.
I am attaching my Upwork profile for specific queries.
Sergio Daniel Suarez
Mechanical Designer
| Upwork Profile | LinkedIn