06-25-2020
12:01 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
06-25-2020
12:01 PM
Thanks for your help, I got it to work using the following loop:
Private Sub CopyPipes() Dim oPart = Component.InventorComponent("CON1:1") Dim oPartDoc As PartDocument = oPart.Definition.Document Dim oPath As String = ThisDoc.Path For XX As Double = 1 To (COUNT1 + COUNT2 + COUNT3 + COUNT4 + COUNT5) Step 1 oPartDoc.SaveAs(oPath & "/CON" & XX & ".ipt", True) Next End Sub
I was able to mimic it for my straps and strut as well:
Private Sub CopyStraps() Dim oPart = Component.InventorComponent("Strut Strap1:1") Dim oPartDoc As PartDocument = oPart.Definition.Document Dim oPath As String = ThisDoc.Path For XX As Double = 1 To (COUNT1 + COUNT2 + COUNT3 + COUNT4 + COUNT5)*2 Step 1 oPartDoc.SaveAs(oPath & "/Strut Strap" & XX & ".ipt", True) Next End Sub