Check drawing for changes since last open

Check drawing for changes since last open

ChristianAndersenIsmyname
Advocate Advocate
488 Views
6 Replies
Message 1 of 7

Check drawing for changes since last open

ChristianAndersenIsmyname
Advocate
Advocate

Hi,

My coworkers have used a different cad program that would highlight all changes on a drawing since last save/open (or something, not sure how exactly that worked) every time the drawing was opened. This was an effordless operation as it didn't take any noticable extra time to check for changes.

If I change the position or shape of a part in an assembly, that part would be highlighted in the drawing next time I open the drawing.

Now they want something similar to Inventor.

 

The only way I could think of doing this is by adding it to my add-in.

The information for each dimension in the drawing must be stored in the file somewhere, so if I can access those I might be getting somewhere.

Is this even possible? Maybe create PDF's on save and compare those?

0 Likes
Accepted solutions (1)
489 Views
6 Replies
Replies (6)
Message 2 of 7

Zach.Stauffer
Advocate
Advocate
Accepted solution
Message 3 of 7

ChristianAndersenIsmyname
Advocate
Advocate

This looks pretty good!

The code also look fairly easy to understand, so adjusting it to our taste is hopefully achievable.

 

Thanks!

0 Likes
Message 4 of 7

WCrihfield
Mentor
Mentor

Just some other thoughts that might be applicable in a wider range of effect.  We know that Inventor has HighlightSets & HighlightSet objects.  And we know that most objects in Inventor have the AttributeSets property (Link1, Link2).  But we also know that most objects in Inventor don't have the 'Dirty' property, that would be useful in this situation.  So, what about a background process that would attempt to create an AttributeSet under that AttributeSets property, then an Attribute attached to each applicable type of object that you might want to monitor the changes of (within reason, ability to be monitored).  The attribute could be a simple Boolean, of course.  The highlight set thing may have to be used with a button for momentary check type situation, rather than a constant presence, similar to the Degrees of Freedom setting on the View tab, but maybe without the constant on option.  When you click the button, it will use the AttributeManager to get all objects with that Attribute, who's Value is set to True, then add them to a HighlightSet.  Of course, these objects would have to be things that 'can' be added to a HighlightSet.  Just a thought.  Maybe too processor/system resources heavy, I don't know.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

Message 5 of 7

ChristianAndersenIsmyname
Advocate
Advocate

Hi!

It sounds beautiful, and I agree it should be fired from a button if it’s resource heavy. If it’s light-weight it would be optimal if I could fire it up during document load event.

 

If my boss sees this post, I bet he’ll say “yes, just do that”, but I have no idea how to even begin with this except copy-paste and alter the code that was first commented here.

0 Likes
Message 6 of 7

WCrihfield
Mentor
Mentor

Yes, it does sound like it could turn into a rather large project.  The code mentioned in original link does not actually monitor for any 'Events', just records some stuff before making any changes, then compares those recordings with the same objects after making all changes, to see if they still match.  But attempting to record various possible aspects of a vast assortment of possible entity types within a drawing document, as it loads, in and of itself sounds almost insurmountable.  Then the other half of the problem...trying to go back through that vast assortment of possible entity types to compare the various possible aspects of those entities with the previously recorded data.

 

I don't know if you are aware of all the possible 'Events' that are available for us to utilize in Inventor, and the extent to which we are able to extract detailed information and/or filter what we respond to or not, but there are more than what you see within the Event Triggers dialog.  And when you create your own custom event handlers, you often have a lot more opportunity for higher efficiency, accuracy, and functionality.  Here is a link to one of my contribution posts about creating and using your own custom event handler codes.  It was written with iLogic in mind, but the same principles apply when used within AddIns and vb.net, and trying to use custom event handlers by using iLogic rules is rather 'clunky'.  I don't actually have much experience with creating add-ins, due to corporate restrictions at work (no employees are allowed administrators rights on their own PCs), but understand a lot of what's required.  If you could monitor for certain events to happen, you might be able to use that to know when things change, and utilize the event handler to record or edit things related to those changes, to help with a project like this.  Unfortunately there aren't many drawing document specific events that I know of right now that would be useful to monitor besides retrieving model dimensions to the drawing.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

Message 7 of 7

ChristianAndersenIsmyname
Advocate
Advocate

Yes, this project would likely turn into something I’m not capable of coding, and have to bug everyone in this forum to make it work.

Would be better if someone else did it and let me (my boss) buy the code.

Are you interested (joking (but not really))?

 

Maybe I can make something out of your ideas in a couple years, and with more experience in coding.

0 Likes