Check if drawing has unsaved user edits

Check if drawing has unsaved user edits

pball
Mentor Mentor
398 Views
2 Replies
Message 1 of 3

Check if drawing has unsaved user edits

pball
Mentor
Mentor

I have a batch function that processes open drawings and it closes each drawing it processes. I'd like to check if a drawing has unsaved user edits before closing it. However checking if the status of the file is dirty isn't granular enough of a check. I noticed if you modify a part and then open its drawing, the drawing is dirty because the part changed. I'd like to ignore that situation. I only want to know when a user has edited a drawing. Inventor knows the difference, but I'm not sure if the API can access that info.

 

Part updated but no changes made to drawing

pball_0-1613769887536.png

 

Drawing edited by user

pball_1-1613769955553.png

 

Check out my style edits for the Autodesk forums
pball's Autodesk Forum Style
399 Views
2 Replies
Replies (2)
Message 2 of 3

bradeneuropeArthur
Mentor
Mentor

Try this:

 

.ActiveDocument.RequiresUpdate

.ActiveDocument.RequiresUpdate

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 3 of 3

pball
Mentor
Mentor

Unfortunately in my quick test .RequiresUpdate returned false for edits make to the drawing and when the model was edited and the drawing opened afterwards. So I'm not sure what updates that property is looking for.

Check out my style edits for the Autodesk forums
pball's Autodesk Forum Style
0 Likes