Message 1 of 10
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have found how others have deleted suppressed patterns that are rectangular OR circular, but not both.
Here is what I'm using, which works great unless a suppressed RectangularOccurrencePattern also exist, then I get an error. Please help.
SyntaxEditor Code Snippet
Dim oAsmDoc As AssemblyDocument = ThisDoc.Document Dim oAsmDef As AssemblyComponentDefinition = oAsmDoc.ComponentDefinition RunAgain: oAsmDoc.Update Dim oOccs As ComponentOccurrences = oAsmDef.Occurrences For Each oOcc As ComponentOccurrence In oOccs If oOcc.Suppressed Then If oOcc.IsPatternElement Then Dim oCPattern As CircularOccurrencePattern = oOcc.PatternElement.Parent oCPattern.Delete Goto RunAgain End If End If Next
Solved! Go to Solution.