Quantcast
Channel: PC-DMIS User Forum - Forums
Viewing all articles
Browse latest Browse all 11658

Auto-Save Program is saving offline program instead of online program

$
0
0
I'm using this script to auto save the program for each part run:
Code:
Sub Main(strFile As String)
Dim App As Object
Dim Part As Object
Dim bolPassFail As Boolean

Set App = CreateObject ("PCDLRN.Application")
Set Part = App.ActivePartProgram

bolPassFail = Part.SaveAs (strFile)
'Cleanup
Set App = Nothing
Set Part = Nothing

End Sub
While running a part, I was editing another program offline. It got to the point in the program for it to auto-save the program and I noticed that the offline program was the one that got saved instead of the program that was running.

I assume this is because of "App.ActivePartProgram"
Is there a way to make sure this problem doesn't happen?

Viewing all articles
Browse latest Browse all 11658

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>