I am using Inventor 2022 and VBA in it. I tryed to save file with VBA script (macro - button).
Here is the code, which is included in documentation of old version of Inventor but it include some errors:
Dim oDoc As PartDocument
Rem this causes the "Invalid character _"
oDoc = _InvApplication.Documents.Add(DocumentTypeEnum.kPartDocumentObject)
Rem this causes the "Expected: ="
oDoc.SaveAs("C:\Temp\SaveTest.ipt", False)
Source: https://github.com/ADN-DevTech/Inventor-Training-Material (common Inventor Functions the powerpoint presentation)
All of my solutions are not correct!
I think this is the rewrited code from object browser but not in Inventor library:
Inventor.FileSaveAs.AddFileToSave(oDoc, "C:\myTemp\t.ipt")
I found also someting like this:
Inventor.FileSaveAs.AddFileToSave := oDoc, "C:\myTemp\t.ipt"
Thank you for any help.