09-27-2018
05:27 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
09-27-2018
05:27 PM
Okay, I got this thing working without breaking. I want to add a wait loop in case the timer runs out but I am working in a different document at the time, but ith keeps skipping through my loop:
102 ' Waiting till part can be saved, then saving
' Get the Active part document.
Dim CurrDoc As Inventor.Document
Set CurrDoc = invApp.ActiveDocument
Do While CurrDoc <> ThisDoc
DoEvents ' Yield to other processes.
Set CurrDoc = invApp.ActiveDocument
Loop
ThisDoc.Save2 (True) 'Saving file at end of timer
'End 102 Waiting till part can be saved, then savingit is not saving the file because i'm not active in ThisDoc when the timer runs out, and carries on to my restart MsgBox.