Reply
Solved! Go to solution

Dirty property doesn't work

Hi folks,

 

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:

 

Imports System.Runtime.InteropServices

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
    End Sub
End Class

 

4 REPLIES

Re: Dirty property doesn't work

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

___________________________
The truth is .... I am Dutch
VB.NET - C# - VS Ex 2015 - ST9

Re: Dirty property doesn't work

Hi JanWillem,

 

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?  

 

Greetz,

 

Jan (without Willem…)

Solution
Solution
Accepted by topic author jmaas
‎02-10-2017 04:33 AM

Re: Dirty property doesn't work

Hi Jan,

 

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?

 

Cheerz.

___________________________
The truth is .... I am Dutch
VB.NET - C# - VS Ex 2015 - ST9

Re: Dirty property doesn't work

Hi WillemJan,

 

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 !!

NTS-Group Eindhoven