Document saving rejection event

Document saving rejection event

Anonymous
Not applicable
477 Views
1 Reply
Message 1 of 2

Document saving rejection event

Anonymous
Not applicable

Hi all!

 

I try to develop add in into Revit. I need ask user about saving changes into my plugin even document wasn't changed. It will be good to know when before document closing system will ask user about saving document and when not. Are there some field or method which can say is document was changed and is it requires saving? Or it will be great to know when saving dialog was asked to user and he choose "No".

 

Thank you!

0 Likes
Accepted solutions (1)
478 Views
1 Reply
Reply (1)
Message 2 of 2

jeremytammik
Autodesk
Autodesk
Accepted solution

Dear Aspo,

 

Have you instaslled the Revit API help file RevitAPI.chm? It is included in the Revit SDK.

 

You really need to have that at hand always when working with the Revit API.

 

Look at the Doucment members.

 

They include the Document.IsModified property, which reports the state of changes made to the document.

 

You might also want to look at the IsModifiable and IsReadOnly properties; if they are false and true respectively, the document cannot be modified anyway.

 

Cheers,

 

Jeremy

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder