Message 1 of 2
Make component of a pattern idependent then delete it
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have the code for deleting a pattern in an assembly but what I would really like to do is make the components independent before I delete them, the code I have for deleting the pattern is below if any one can add to it so it will make the compents independent then delete the pattern that would be awsome, I find when working with large asseblies it starts to take a long time to make a pattern independent then delete it, however if I use the macro for deleting them it takes no time at all thats why I would like to add the make independent before deleting. Please Help!
Sub DeletePattern()
Dim oDoc As AssemblyDocument
Set oDoc = ThisApplication.ActiveDocument
Dim oDef As AssemblyComponentDefinition
Set oDef = oDoc.ComponentDefinition
Dim oCompPattern As OccurrencePattern
Set oCompPattern = oDef.OccurrencePatterns.Item(1)
oCompPattern.Delete
End Sub
Sub DeletePattern()
Dim oDoc As AssemblyDocument
Set oDoc = ThisApplication.ActiveDocument
Dim oDef As AssemblyComponentDefinition
Set oDef = oDoc.ComponentDefinition
Dim oCompPattern As OccurrencePattern
Set oCompPattern = oDef.OccurrencePatterns.Item(1)
oCompPattern.Delete
End Sub