Message 1 of 3
Save and replace with iLogic

Not applicable
06-03-2015
03:49 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello
ist there a way to save and raplece external file with i Logic
To frist save in one name and the replace with another
'get the part
part = Component.InventorComponent("Glashalter mittig:1")
'open the part
doc = ThisApplication.Documents.Open(part.Definition.Document.FullDocumentName)
'oPath = ThisDoc.Path & "\"
' save the part as step
' doc.SaveAs(oPath & "Glashalter mitte position_" & Position & ".stp" , True)
doc.SaveAs("C:\Users\Aleksandar.Jovicic\Desktop\FGL\Steps\Glashalter mitte.stp" , True)
doc.Replace("Glashalter mitte.stp", "Glashalter mitte " & Position &".stp", True)
' close the part
doc.Close()