Monitor parameter change

Monitor parameter change

Anonymous
Not applicable
422 Views
3 Replies
Message 1 of 4

Monitor parameter change

Anonymous
Not applicable

Is there a way of monitoring for parameter changes and then running subroutines or other things based on the change, like:

 

If HouseColor *changes* Then
   Call PaintHouse()
End IF

 I'm looking to do this for a multi-value string parameter thats in a form as a combo box.

Preferrably I would like to see this done without any external files as I am trying to create a .ipt that contains everything for the thing I'm working on.

 

Is this possible?

 

0 Likes
423 Views
3 Replies
Replies (3)
Message 2 of 4

adam.nagy
Autodesk Support
Autodesk Support

Hi,

 

I've written a blog post which should be of help:

http://adndevblog.typepad.com/manufacturing/2014/11/get-notified-about-parameter-change.html

 

Cheers,



Adam Nagy
Autodesk Platform Services
Message 3 of 4

Anonymous
Not applicable

Thanks for the input, what you did in the blog post looks great, but my rule is very complex with 20+ parameters, so I dont think I can use your method.

Is it possible to use ModelingEvents.OnParameterChange to monitor specific parameters, or is it the global "Any parameter change" check?

 

Thanks!

0 Likes
Message 4 of 4

adam.nagy
Autodesk Support
Autodesk Support

It is global, but there you'll get the parameter that changed as an input parameter:

Event OnParameterChange(DocumentObject As _Document, Parameter As Parameter, BeforeOrAfter As EventTimingEnum, Context As NameValueMap, HandlingCode As HandlingCodeEnum)


Adam Nagy
Autodesk Platform Services
0 Likes