Message 1 of 10
Wait till Excel is saved
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I have a piece of code that sends values to Excel. The Excel is then saved. Excel then calculates the values. And as a final step I retrieve the values from Excel.
Now I have a problem with saving. It seems that Inventor doesn't wait for Excel is saved. Is there a way to program Inventor to wait for the Excel to be saved?
I tried this, but this doesn't work:
'Retrieve the name of the excel file from the user parameter
ExcelFile = Parameter("ExcelName")
' Send to Excel
GoExcel.CellValue(ExcelFile & ".xlsx", "Values from Inventor", "B7") = ExcelHeight
GoExcel.Save
' Wait till excel is saved
ThisApplication.UserInterfaceManager.DoEvents
' Build the model
iLogicVb.RunRule("Update")