Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Monitor parameter change

3 REPLIES 3
Reply
Message 1 of 4
TommySWE
289 Views, 3 Replies

Monitor parameter change

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?

 

3 REPLIES 3
Message 2 of 4
adam.nagy
in reply to: TommySWE

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
TommySWE
in reply to: adam.nagy

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!

Message 4 of 4
adam.nagy
in reply to: TommySWE

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

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

Post to forums  

Autodesk Design & Make Report