- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I would like to know If an ilogic rule can be written that would do the same thing as If one was to go into the base view settings in a drawing and change out the ipart member that is being used within the drawing? screencast video is attached.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Sub ChangeiFactoryViewMember()
Dim app As Application
Dim IDW As DrawingDocument
Set app = ThisApplication
Set IDW = app.ActiveDocument
Dim DV As DrawingView
Set DV = IDW.ActiveSheet.DrawingViews(1)
DV.ActiveMemberName = "iPartTest-02"
End SubYou'll want to add error trapping and some code to figure out what member you want to change to but it's fairly straight forward.
Edit: Sorry just realized I posted VBA code not iLogic. I'll do a new one for iLogic... just a minute.
Mass Override for Each Model State
Custom Glyph Icon for iMates
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Dim DV As DrawingView = ActiveSheet.View("VIEW1").View
DV.ActiveMemberName = "iPartTest-03"Turns out it's even easier in iLogic.
Mass Override for Each Model State
Custom Glyph Icon for iMates
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I want auto-update ipart view, placed in idw, as ipart changes its configuration & lengths,
with your solution I am Unable to get desired output as of now, Kindly tell me how to use this Programme or other logic program?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi. What about if I use İassembly rather than ipart in the drawing? I would appraciate if you help me. Thanks.
Ulaş Deniz

Forumlarımızda çözülen sorularınızı "ÇÖZÜM OLARAK KABUL ET" ( "ACCEPT AS SOLUTION" ) seçimiyle işaretlemeyi lütfen unutmayın.
Beğendiğiniz mesajları lütfen "Övgü Puanı" (KUDO) ile ödüllendirin.
Youtube : https://www.youtube.com/channel/UCkJpVueGScmJvW1RIgqttSg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report