API Crash bug when creating fitted spline.

API Crash bug when creating fitted spline.

Anonymous
Not applicable
691 Views
3 Replies
Message 1 of 4

API Crash bug when creating fitted spline.

Anonymous
Not applicable

When calling sketchCurves.sketchFittedSplines.add(pointlist) using a list of two points with just two Point3D coordinates (all zeros: [[0,0,0],[0,0,0]]), the add function throws an InternalValidationError, instead of returning a None/null as specified by the documentation.

0 Likes
Accepted solutions (1)
692 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable

The thrown error is

 

 

---------------------------
Fusion 360
---------------------------

  ...snip...
    self.fittedSpline = activeSketch.sketchCurves.sketchFittedSplines.add(self.points)     # TODO - Evaluate the first/last point for merge/close
  File "C:/Users/zarth/AppData/Local/Autodesk/webdeploy/production/79ccc336d91fd2d46ed87a5b819b04c15b878e83/Api/Python/packages\adsk\fusion.py", line 26338, in add
    return _fusion.SketchFittedSplines_add(self, *args)
RuntimeError: 2 : InternalValidationError : createdSpline

---------------------------
OK   
---------------------------

 

0 Likes
Message 3 of 4

goyals
Autodesk
Autodesk
Accepted solution

There are two types of validation done by API. One is client inputs validation. In case wrong arguments passed to API then API throws exceptions passing the error message to the script and second If API failed to create geometry with passed inputs. I agree We have really not documented all the errors an API can return but I do not think it is causing any crash in Fusion. Python will stop further execution of script if an unhandled exception occurs.



Shyam Goyal
Sr. Software Dev. Manager
Message 4 of 4

goyals
Autodesk
Autodesk

Just to let you know We have a separate page specifically for API queries. Please take a look at https://forums.autodesk.com/t5/fusion-360-api-and-scripts/bd-p/22.  In case you have any further queries, you might like to post it there and it will help to get faster response. Thanks.



Shyam Goyal
Sr. Software Dev. Manager
0 Likes