Message 1 of 4
How to Undo Checkout of All (Inventor) Suppressed Components
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi All,
I posted the following question on the Inventor Customization forum, though haven't received a response, so wondering if this is the right place to ask.
Below is a method in a C# application which will delete all suppressed occurrences from an assembly, however I need to add some logic to first undo checkout of the suppressed components prior to the delete operation.
Any suggestions?
public static void DeleteSuppressedOccurrences(Document document)
{
if ((int)document.DocumentType != Enum.AssemblyDocument) return;
var assyDoc = (AssemblyDocument)document;
var assyOccs = assyDoc.ComponentDefinition.Occurrences;
foreach (ComponentOccurrence occ in assyOccs)
{
if (occ.Suppressed)
{
occ.Delete();
}
}
}