Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
mtresky
in reply to: Anonymous

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