Message 1 of 7
doubt in delete patterns of suppressed parts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
one doubt in delete patterns of suppressed parts, but if in pattern, pattern is Rectangular itself and its first instance is Circular pattern then my below code is not working.
' Delete suppressed patterns as well as suppressed parts 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 oPattern As Object = oOcc.PatternElement.Parent If TypeOf oPattern Is CircularOccurrencePattern Or TypeOf oPattern Is RectangularOccurrencePattern Then oPattern.Delete GoTo RunAgain End If End If End If Next 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
Can anyone help me on this: Thank you ion advance :)