Community
Fusion API and Scripts
Got a new add-in to share? Need something specialized to be scripted? Ask questions or share what you’ve discovered with the community.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to detect if user has changed a modelParameter

2 REPLIES 2
Reply
Message 1 of 3
swagath.sivakumar
240 Views, 2 Replies

How to detect if user has changed a modelParameter

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?

2 REPLIES 2
Message 2 of 3

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 360 Developer
Autodesk, Inc.

Message 3 of 3
ekinsb
in reply to: swagath.sivakumar

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

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report