Is there a test I can do to a drawing to see if it has been modified since opening?
The code I've written needs to be able to differentiate so as to minimize user input. I can make it work one way or the other,but I need some sort of marker that I can insert into an if statement to determine whether to simulate user input for changes made, or exit with no changes.
Solved! Go to Solution.
Try adding ModelGeometryVersion to an attribute and compare the ModelGeometryVersion for changes.
I may need to be treated like a vba rookie here.
I was hoping to find something like what Excel has where I can test if "Activeworkbook.saved = true" which means there have been no changes since the last save.
I tried setting up attributes, but I really have little undestading what they reference to and how they work.
ModelGeometryVersion can used to track the changes made to the referenced part of the drawing. If you want to check the drawing only try the below code.
Public Sub Drawing_Change() Dim oDoc As DrawingDocument Set oDoc = ThisApplication.ActiveDocument If oDoc.Dirty = True Then MsgBox ("Changes Have been made") Else MsgBox ("No changes made") End If End Sub
this will show if any changes made after the last save.
OK, I see how it works. I was looking to compare it to the checked-out file. If there were no changes since check-out then a save & check-in would be required.
As is, if there have been saved changes since check-out the system reads the file as not having changed at all.
How to check wheher the drawing Drawing document has been modified or not?
ModelGeometryVersion is not the part of drawing document.