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: 

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

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
DerekZCXVY
288 Views, 6 Replies

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

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.

 

 

 

6 REPLIES 6
Message 2 of 7
kandennti
in reply to: DerekZCXVY

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 

 

Message 3 of 7
DerekZCXVY
in reply to: DerekZCXVY

@ 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 ?

Message 4 of 7
DerekZCXVY
in reply to: DerekZCXVY

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

Message 5 of 7
kandennti
in reply to: DerekZCXVY

@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.

Message 6 of 7
kandennti
in reply to: DerekZCXVY

@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 

Message 7 of 7
DerekZCXVY
in reply to: DerekZCXVY

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

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