According to the documentation, setting the DIRTY property should do this:
If you set the property to True, Solid Edge prompts for the Save operation when exiting.
As long as I know, this doesn't work: even if you set this property to TRUE, SE just closes the file without prompting.
See below a little sample program to test this behaviour:
Public Class Form1
Dim seApp As SolidEdgeFramework.Application
Dim seDocuments As SolidEdgeFramework.Documents = Nothing
Dim seDocument As SolidEdgeFramework.SolidEdgeDocument = Nothing
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
seApp = DirectCast(Marshal.GetActiveObject("SolidEdge.Application"), SolidEdgeFramework.Application)
seDocument = seApp.ActiveDocument
seDocument.Dirty = True
Solved! Go to Solution.
I think it's strange to be able to set this to true, because why save a file that hasn't been modified.
If you want to set it to true, you could show and then hide all the planes for example. Solid Edge will then mark the document as dirty
You are wright: it should not be necessary to set the Dirty bit to TRUE, when you modify SE files through programming.
But, even as you can see that the Dirty bit is TRUE, SE doesn’t prompt for saving after a modification by programming.
Another annoying fact: SE keeps this behavior the whole session. Restarting SE is the only manner to reset it.
Could you test this with the sample program if you see the same behavior?
Jan (without Willem…)
If restarting SE works for you, then I think I know what the problem is.
Would it work if you set seApp.DisplayAlerts = true ?
btw: are you dutch?
Yes, this is the solution!!!!
I normally set DisplayAlerts to False, but now I will set it back to True on exit.
Thanx very much.
P.S. Yes I’m Dutch as hell !!