DocumentModified

Returns or sets the document's modified flag. The modified flag indicates whether or not any changes to the current document have been made.

Note, setting the document modified flag to false will prevent the "Do you want to save this file..." from displaying when you close Rhino.

Syntax

rhinoscriptsyntax.DocumentModified(modified=None)

rhinoscript.document.DocumentModified(modified=None)

Parameters

modified

Optional. Boolean. The modified state, either True or False.

Returns

Boolean

If no modified state is specified, the current modified state if successful.

Boolean

If a modified state is specified, the previous modified state if successful.

Example

import rhinoscriptsyntax as rs

modified = rs.IsDocumentModified()

if not modified: rs.DocumentModified(True)

Also See

IsDocumentModified