Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
WCrihfield
in reply to: helouise

Hi @helouise.  You mentioned before that you did not want to save the part again if no changes were needed, but i didn't see anything within the code for saving the part.  However, just in case this might be useful to you, there is a technique I often use in my rules that deal with iProperties.  I use this to avoid saving the file if it is not necessary.  When you access the iProperty sets the manual way (Document.PropertySets) the PropertySets object has a Property you can check called 'Dirty', which has a Boolean value that is ReadOnly.  If any iProperties have changed since the document was opened, this property will change to True.  At the end of a rule that may have changed some iProperties, where I would normally save and/or close the document, I check this value, and only Save if it is True.

 

If this solved your problem, or answered your question, please click ACCEPT SOLUTION.
Or, if this helped you, please click (LIKE or KUDOS) :thumbs_up:.

If you want and have time, I would appreciate your Vote(s) for My IDEAS :light_bulb:or you can Explore My CONTRIBUTIONS

Wesley Crihfield

EESignature

(Not an Autodesk Employee)