check if files it Update and purge? any idear

check if files it Update and purge? any idear

Darkforce_the_ilogic_guy
Advisor Advisor
157 Views
1 Reply
Message 1 of 2

check if files it Update and purge? any idear

Darkforce_the_ilogic_guy
Advisor
Advisor

I have a code that run before save. that Update and Purge  styles on file.  but I can see when I run the coden even when that is nothing to update and purge . Inventor belive that the files have change.  Is that a way to chech if that files styles is both fully update and purge.  so I can make if skip the script(ilogic code ) ?

0 Likes
158 Views
1 Reply
Reply (1)
Message 2 of 2

WCrihfield
Mentor
Mentor

Hi @Darkforce_the_ilogic_guy.  I do not think a code like that would be possible right now, if it is covering all possible things that can possibly be updated or purged from all possible document types.  As you have seen, there are several things to consider, and some of them do not have a property that let you know if they require updating.  You could probably check some things within some document types with a code like that, but not everything possible in every document type.  In a drawing, the Style object is nice because it has an 'UpToDate' property, and an 'InUse' property to check, along with an 'UpdateFromGlobal' method, but some other types of things do not have those conveniences.

Would a partial solution be OK?  It might at least reduce some unnecessary saves.  However, if you have the code triggered to run by 'before save', I'm not sure it would prevent it from continuing to save anyways.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes