New to Scripting in Fusion, Well Versed in Python. How to use Textcommands

New to Scripting in Fusion, Well Versed in Python. How to use Textcommands

DerekZCXVY
Contributor Contributor
885 Views
6 Replies
Message 1 of 7

New to Scripting in Fusion, Well Versed in Python. How to use Textcommands

DerekZCXVY
Contributor
Contributor

Hows it going guys!

 

I just started to sink my teeth into scripting within Fusion. I have written many scripts for Rhino 7 but never for fusion. I thought an easy first project would be to convert a quad mesh into t splines. But this is proving to be harder than I initially thought. I know there is a convert command via the fusion UI and within that command there is an option to convert a quad mesh into t splines, but I cant seem to figure out how to actually access that within the API. Can one access standard commands from the API? Or do I need to take a different approach. I see things like Application.executeTextCommand but I cant really seem to do anything with it. If someone could point me in the right direction that would be awesome.

 

Thanks for reading.

 

 

 

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

kandennti
Mentor
Mentor
Accepted solution

Hi @DerekZCXVY .

 

As for T Splines, I don't think it is provided by the API.

However, I have processed them in the past.

https://forums.autodesk.com/t5/fusion-360-api-and-scripts/insert-obj-file/m-p/9648340#M10770 

 

I'm not familiar with Python, I started with the Fusion360 API.
I have some experience with macros in PowerMill, Catia V5, and other 2DCAD software, etc., but I strongly feel that knowledge of the objects provided by the API is much more important than knowledge of the programming language.

 

It is difficult to handle TextCommand in the API. I think it would be a shortcut to mastery if you gain a lot of experience by modifying the OnlineHelp sample at first before tackling it.

https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-DE98632B-3DC0-422B-A1C6-8A5A15C99E11 

 

0 Likes
Message 3 of 7

DerekZCXVY
Contributor
Contributor

@ kandennti thanks for the link that is exactly what I was looking for ! Do you know where I can get a readout of all the text commands that go with that object / class ?

0 Likes
Message 4 of 7

DerekZCXVY
Contributor
Contributor

@kandennti  Do you know where I can create a button for a python script so I can share with my co workers.

0 Likes
Message 5 of 7

kandennti
Mentor
Mentor

@DerekZCXVY .

 

I am sorry, but I did not understand what you meant.

 

I have described what I know about TextCommands here.

https://forums.autodesk.com/t5/fusion-360-api-and-scripts/use-textcommands/m-p/9645688 

https://forums.autodesk.com/t5/fusion-360-api-and-scripts/use-textcommands2/m-p/9937161 

 

This is because I felt it was impossible for me to find out everything by myself.

0 Likes
Message 6 of 7

kandennti
Mentor
Mentor

@DerekZCXVY .

 

It would be more convenient for everyone if it could be called from a button.

To do this, you need to create an add-in instead of a script.

https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-9701BBA7-EC0E-4016-A9C8-964AA4838954 

0 Likes
Message 7 of 7

DerekZCXVY
Contributor
Contributor

@kandenntiThanks for all your help, I truly appreciate it.

0 Likes