Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

GetChangeTypeParameter old value?

2 REPLIES 2
Reply
Message 1 of 3
dante.van.wettum
499 Views, 2 Replies

GetChangeTypeParameter old value?

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 ?

2 REPLIES 2
Message 2 of 3

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. 

 

 

Message 3 of 3

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Customer Advisory Groups


Rail Community