Forms creation from code

Forms creation from code

Anonymous
Not applicable
413 Views
1 Reply
Message 1 of 2

Forms creation from code

Anonymous
Not applicable

Hello, this is my first post on this forum. I searched it to see wether there are already answers to what I'm trying to do but didn't find any, so here goes.  I can perform the following manual steps in the GUI, as an example:

Create Form -> click Box -> Select Plane, Specify Center point -> Enter sizes (1,1,1)

RightClick on a Vertex (0.5, 0.5, 0.0) -> Edit Form -> Extrude Vertex (x 1.0), so now it looks like an elongated suitcase with a nose cone.

 

I'd like to do these same steps programmatically in Python. Once I accomplish this much, I'll go further and expand the program for a more complicated form, but I think this should be the first step. How does one go about something like this? Is it better to start with creating a form by hand and then get to it in the program as an existing entity and go from there, or can it be started in code from scratch on the first line of business logic, after the initial scaffolding     import adsk.  ....   app ...  doc ...   design ... rootcomp ...  etc.... ?

 

I have an iMac (Catalina 10.15.1), VS-Code downgraded back to 2019.9.34911 as recommended.

Thanks in advance.

414 Views
1 Reply
Reply (1)
Message 2 of 2

kandennti
Mentor
Mentor

Hi @Anonymous .

 

I don't think the API for creating a Form (TSplineBody) is currently supported.

If there is a possibility, there seems to be no other than directly creating and importing a TSM file. And it is very difficult.

 

This may help a little.

https://forums.autodesk.com/t5/fusion-360-api-and-scripts/edit-face-via-api/m-p/9190349#M8974 

0 Likes