Property change event?

Property change event?

Anonymous
Not applicable
501 Views
2 Replies
Message 1 of 3

Property change event?

Anonymous
Not applicable
Is there an event notification when an iProperty changes? I'm looking for something like ModelingEvents.OnParameterChange for properties.

The closest I have come is to catch OnDocumentChange and then check if ReasonsForChange = kFilePropertyEditCmdType. This is close, but it doesn't tell me which property was changed.
Is there any other way?

Thanks
0 Likes
502 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
Ya OnDocumentChange is the only one that offer any information. What we need is for the API devlopment teams to add the data you are looking for to the Context argument. I think many Inventor programmers would find this useful.
0 Likes
Message 3 of 3

Anonymous
Not applicable
It's right that OnDocumentChange is the only way to do this today. However,
there's a way you could use this along with a bit of extra work to do what
you need.

Whenever a document is opened that you want to monitor you can read and save
the values of all of the iProperties. You'll need to set up a data
structure so you can maintain a set of iProperty values for each document
that's open. When you get the OnDocumentChange event and it's for
iProperties you can read the current values from the document and compare
them to the cached values you're holding to determine which iProperties were
edited.
--
Brian Ekins
Inventor API Product Designer
http://blogs.autodesk.com/modthemachine
0 Likes