06-24-2020
10:46 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
06-24-2020
10:46 AM
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