Parametric Operations in the API

Parametric Operations in the API

sgraves
Enthusiast Enthusiast
1,239 Views
6 Replies
Message 1 of 7

Parametric Operations in the API

sgraves
Enthusiast
Enthusiast

I am getting frustrated trying to create parametric operations in the API.  There are many operations that are parametric in the UI that don't seem to be in the API.  For example, there seems to be no way to create a parametric transform.  In the UI, I can do a translate, rotate, etc. and use a parameter.  It would appear that the equivalent API operation is MoveFeature.  MoveFeature uses Matrix3D to hold the transform parameters.  The inputs for the functions of Matrix3D all appear to be doubles.  Is there a trick to make those parameteric?  I have tried using ValueInput in various ways, but haven't discovered the secret sauce.

 

Needless to say, any meaningful app must be parametric, so I must be missing something.

 

Any help would be greatly appreciated.

0 Likes
Accepted solutions (1)
1,240 Views
6 Replies
Replies (6)
Message 2 of 7

ekinsb
Alumni
Alumni

When API support was originally implemented for the Move feature, the feature wasn't parametric.  It has since been enhanced so that some of the move types are parametric.  Unfortunately, the API has not been updated to support these enhancements.  What you see in the API is the equivalent of the the current "Free Move" move type that you see in the Move command dialog, which is not parametric.  I've added an item into our backlog so we can prioritize this with the other work we need to do.  I don't know when it will be available at this point.

 

 


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
0 Likes
Message 3 of 7

sgraves
Enthusiast
Enthusiast

@ekinsb  Thank you very much for the reply.  I am trying to do a parametric rotate of an involute curve.  As you know for a gear that rotate must be dependent on the number of teeth.  I have tried using the circular pattern as a back door.  Any other ideas on how to do a parametric rotate.  I can go back to dimensioning the points of the curve and creating parameters that include the rotation.  Unfortunately, that approach is incredibly slow.

 

Any tips?

0 Likes
Message 4 of 7

ekinsb
Alumni
Alumni

Even with the enhancements I referred to, moving sketch objects is never parametric.  Parametric moves are only supports for bodied and components so even if the new enhancements were supported by the API it will wouldn't work with sketch geometry.  I guess you could rotate the component that contains the sketch but that would rotate everything in the sketch which you may not want and still wouldn't be parametric with today's API.  I guess I don't really see a good solution today.

 

 


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
0 Likes
Message 5 of 7

sgraves
Enthusiast
Enthusiast
Accepted solution

I knew if I kept at it I would find a solution.  I drew a construction line from every point in the curve to the origin, then I set a parametric angle dimension on the first construction line.  It works fast and is parametric.

0 Likes
Message 6 of 7

ekinsb
Alumni
Alumni

That's great you found a solution.


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

Anonymous
Not applicable

This answer has another way to do this too:

 

https://help.autodesk.com/view/fusion360/ENU/?caas=caas/discussion/t5/Fusion-360-API-and-Scripts/Set...

 

Basically - create using placeholder dimensions, add constraint, then update the constraint to be a user parameter (e.g. text string).

0 Likes