Message 1 of 14
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi
I am trying to make a rule that runs through my iam and delete all flat patterns on sheet metal parts
Can someone help me out with this rule.
Here is what I have:
'define the active assembly Dim oAssyDoc As AssemblyDocument oAssyDoc = ThisApplication.ActiveDocument ' MessageBox.Show("Message1", "Title") Dim oDoc As Inventor.Document 'Check all referenced docs For Each oDoc In oAssyDoc.AllReferencedDocuments MessageBox.Show("Message2", "Title") 'Dim oDoc As Inventor.Document Dim smpCompDef As Inventor.SheetMetalComponentDefinition MessageBox.Show("Message3", "Title") If (smpCompDef.HasFlatPattern = True) Then Try MessageBox.Show("Message4", "Title") smpCompDef.Delete() Catch MessageBox.Show("Message5", "Title") End Try End If Next 'update the files InventorVb.DocumentUpdate()
Best regards
TG
Autodesk Inventor/Vault Professional 2021
TG
Autodesk Inventor/Vault Professional 2021
Solved! Go to Solution.