Get notified about parameter change

<?xml encoding=”UTF-8″>By Adam Nagy

You can use either the Inventor API to achieve this (from an AddIn, external application or VBA), but can also use iLogic.

If you have a Rule that is using directly the parameter you are interested in then that rule will be run when that parameter changes. If I have a model that has an extrusion with d0 height and d1 angle and create the below rules then they will be fired when those are changed:

s = d0
MsgBox("HeightChanged")

Heightchanged

You can do the same with a Multi-Value parameter as well:

s = MultiValue
MsgBox("MultiValue changed to " + s)

Multivalue

In case of using the Inventor API you can listen to the ModelingEvents.OnParameterChange event.


Comments

Leave a Reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading