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: 

Detecting invalid modeling operations

1 REPLY 1
SOLVED
Reply
Message 1 of 2
gel19
172 Views, 1 Reply

Detecting invalid modeling operations

I am curious whether there is a way to know whether a modeling operation in Python code will be valid or not. E.g. for sweeping. I'm wondering whether it's possible to iterate through a range of parameters and identify those that will produce e.g. a valid sweep. Do we have any information available to us in the API to help with this?

1 REPLY 1
Message 2 of 2
BrianEkins
in reply to: gel19

The only way to verify if a modeling operation will be successful is to try creating and then check the result. The creation may completely fail, or it might complete with an error, which you can check for by using the Feature.healthState and Feature.errorOrWarningMessage properties. That's effectively what the command is doing, although it can execute the creation at a lower level, so it's a bit more efficient, but it is still attempting to create the feature and verify if the creation was successful or not.

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com

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