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

I think something like this should work for you.

 

Dim oApp as Inventor.Application = ThisApplication
Dim oCopyDoc as Document

Dim oCopyPartName as String = "New part name here"
Dim oAssyPath as String = ThisDoc.Path
Dim oCopyPath as String = oAssyPath & "\" & oCopyPartName & ".ipt"

Dim oPart as ComponentOccurrence = Components("Part to copy name here")
Dim oPartDoc as PartDocument = oPart.Definition.Document
Dim oPartFile as String = oPartDoc.FullFileName

oCopyDoc = oApp.Documents.Open(oPartFile,False)
oCopyDoc.SaveAs(oCopyPath,True)
oCopyDoc.Close