GetChangeTypeParameter old value?

GetChangeTypeParameter old value?

dante.van.wettum
Advocate Advocate
763 Views
2 Replies
Message 1 of 3

GetChangeTypeParameter old value?

dante.van.wettum
Advocate
Advocate

I added a IUpdate trigger for when a certain project parameter is changed.

This works fine, and i am able to hook into the moment the parameter is getting a new value.

 

The goal is to lock the parameter when it has a certain value (for example 400) and is then only allowed certain new values based on that old value.

For now it seems i can only get the new value that the user put in when i get the data from GetChangeTypeParameter .

Is there any way to retreive the parameter value prior to the users change that triggered the GetChangeTypeParameter event ?

0 Likes
764 Views
2 Replies
Replies (2)
Message 2 of 3

RPTHOMAS108
Mentor
Mentor

Don't believe so as the change has occurred. Is understandable since the updater is responding to a change and as far as I know isn't recording at the same time the old parameter values.

 

I would probably create a backing value on the element via extensible storage (last valid change). Then after seeing current value is invalid revert back to that value or if value is valid then update backing value on extensible storage. 

 

 

0 Likes
Message 3 of 3

jeremytammik
Autodesk
Autodesk

Dear Dante,
 
Thank you for your query, and many thanks to Richard for yet another spot-on answer, afaik.
 
Cheers,
 
Jeremy

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes