How to detect if user has changed a modelParameter

How to detect if user has changed a modelParameter

Anonymous
Not applicable
502 Views
2 Replies
Message 1 of 3

How to detect if user has changed a modelParameter

Anonymous
Not applicable

I'm trying to create a model that is fully parametric, so the user can fiddle with parameter values to get the exact shape they want. Problem is, if the parameters of certain features are changed, some operations have to be performed again for the model to look okay. I'm wondering how to detect if a parameter has been changed so I can schedule those operations. Here's an example of an out-of-the-box model with 3 pegs: 

Screen Shot 2017-04-26 at 12.47.45 PM.png

 

If the user changes the countU of the pattern to, say, 5:

 

Screen Shot 2017-04-26 at 12.48.22 PM.png

 

How can I say that if the user changes this parameter, perform the extrusion of the central hole again?

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

marshaltu
Autodesk
Autodesk

Hello,

 

Unfortunately with current APIs there is no way to give notification when a parameter is changed. Maybe a new Event can meet the kind of requirements. I would like to recommend you log a request in our ideastation.

 

https://forums.autodesk.com/t5/ideastation-request-a-feature-or/idb-p/125

 

Thanks,

Marshal



Marshal Tu
Fusion Developer
>
0 Likes
Message 3 of 3

ekinsb
Alumni
Alumni

In your specific example, if the feature order is correct in the timeline it should happen automatically.  If the pattern feature is before the extrude feature that creates the hole, then the pattern will be calculated and the hole will be added after.  It won't matter how many instances are in the pattern.  Parametric modeling is very dependent on the order the features are calculated and you have control over that by defining their order in the timeline.


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
0 Likes