Autodesk Inventor
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
How to delete suppressed components by iLogic Rule
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I have an assembly which includes lot of parts (*.ipt) or sub-assembly (*.iam).
I have some ilogic rules to control to suppress or unsuppress them.
Now for the released assembly, I want delete all suppressed components by ilogic rule.
Could anybody help me the ilogic code to get this function?
Autodesk Inventor Professional 2013 (64 Bit) SP1.1
Windows 7 Professional Service Pack 1
Intel(R) Xeon(R) CPU E5645
12.0 GB Memory
Solved! Go to Solution.
Re: How to delete suppressed components by iLogic Rule
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Dim oComp As ComponentOccurrence Dim oComps As ComponentOccurrences oComps = ThisDoc.Document.ComponentDefinition.Occurrences For Each oComp In oComps If Component.IsActive(oComp.Name) = False Then oComp.Delete Next
Re: How to delete suppressed components by iLogic Rule
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi Mike, by any chance do you know how to do the same but for deleting suppressed features in the part environment?
Inventor 2013 Certified Professional
Autodesk Inventor Professional 2011
Windows 7 Enterprise, 64-bit
Re: How to delete suppressed components by iLogic Rule
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Dim oFeature As PartFeature Dim oFeatures As PartFeatures oFeatures = ThisDoc.Document.ComponentDefinition.Features For Each oFeature In oFeatures If Feature.IsActive(oFeature.Name) = False Then oFeature.Delete Next
Re: How to delete suppressed components by iLogic Rule
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Thanks lot, Mike.
Autodesk Inventor Professional 2013 (64 Bit) SP1.1
Windows 7 Professional Service Pack 1
Intel(R) Xeon(R) CPU E5645
12.0 GB Memory
Re: How to delete suppressed components by iLogic Rule
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hello MIke,
For deleting features, do you know how to delete the relative sketches?
I tested the codes, it could delete features, but the sketches are still in the tree.
Autodesk Inventor Professional 2013 (64 Bit) SP1.1
Windows 7 Professional Service Pack 1
Intel(R) Xeon(R) CPU E5645
12.0 GB Memory
Re: How to delete suppressed components by iLogic Rule
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
When I tested it the code deleted the consumed sketches as well as the feature. Can you attach the model?
Re: How to delete suppressed components by iLogic Rule
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Here is a simplified model.
Autodesk Inventor Professional 2013 (64 Bit) SP1.1
Windows 7 Professional Service Pack 1
Intel(R) Xeon(R) CPU E5645
12.0 GB Memory
Re: How to delete suppressed components by iLogic Rule
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Did you already run your delete features sub on this part? The code doesn't do anything at all for me.
Re: How to delete suppressed components by iLogic Rule
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Yes, I did. This is the result after runing the code.
Autodesk Inventor Professional 2013 (64 Bit) SP1.1
Windows 7 Professional Service Pack 1
Intel(R) Xeon(R) CPU E5645
12.0 GB Memory


