Message 1 of 1
ilogic: search and supress element in pattern
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello, i need a rule which let me select components in assembly then supress this automaticly.
Up to know i have actual the part to select the elements but get problems to supress this because in 100% of cases the items are in pattern included.
So i think i need a function which search according the item name the element in every pattern insdie the assembly and supress it. importand that i get the element suppressed and not the item that i dont need to add a new level of detail.
Sub Main() doc = ThisDoc.Document If doc.DocumentType = kPartDocumentObject Then oPart("") Else If doc.DocumentType = kAssemblyDocumentObject Then SelectPart End If End Sub Sub SelectPart() comps = ThisApplication.TransientObjects.CreateObjectCollection While True comp = ThisApplication.CommandManager.Pick( SelectionFilterEnum.kAssemblyOccurrenceFilter, "Select a component") If IsNothing(comp) Then Exit While comps.Add(comp) End While For Each comp In comps oPart(comp.Name) Next End Sub Function oPart(arg) 'here need some help End Function
MR
Autodesk Inventor Professional 2025
Autodesk Vault Professional 2025
Autodesk Inventor Professional 2025
Autodesk Vault Professional 2025