Choose Contours2D by API

Choose Contours2D by API

shutov441-vuz
Contributor Contributor
750 Views
6 Replies
Message 1 of 7

Choose Contours2D by API

shutov441-vuz
Contributor
Contributor

Hello, i have a question about CAM API. Can i choose a Contours2D by using API? It is possible?

Based on the documentation i wrote this

 

for setup in setups:
            # Change the program name of each setup to 1234
            programNameParam = setup.parameters.itemByName('job_programName')
            programNameParam.expression = "1234"
            
            for operation in setup.operations:
                # Change tolerance in all operations
                toleranceParam = operation.parameters.itemByName('tolerance')
                toleranceParam.expression = "0.1mm"

                curveSelections = operation.parameters.itemByName('curves')
                curveSelections.expression = ?????????????

 

0 Likes
751 Views
6 Replies
Replies (6)
Message 2 of 7

kandennti
Mentor
Mentor

Hi @shutov441-vuz .

 

The parameter 'curves' was not found.
I tried it with 'contours' instead.

 

2.png

 

There is no atmosphere where you can set Contour Selection.
I feel that it is only numerical values and character strings that can set parameters with the API.

 

Also, if you are looking for a parameter name, please refer to here.

https://forums.autodesk.com/t5/fusion-360-api-and-scripts/knowing-the-names-of-parameters/m-p/984668... 

 

1.png

 

0 Likes
Message 3 of 7

shutov441-vuz
Contributor
Contributor

I forgot to clarify. These are in the function Multi-Axis Contour.

c4e868ad52.jpg121212111.jpg

Message 4 of 7

kandennti
Mentor
Mentor

I can't try it because it's a personal license, but I feel like I can't specify geometry in the same way.

0 Likes
Message 5 of 7

shutov441-vuz
Contributor
Contributor

Maybe I can specify a specific curve via the file .f3dhsm-template?

0 Likes
Message 6 of 7

kandennti
Mentor
Mentor

I saved the calculated Contours 2D as a template.
I used this script to import the template into the same document.

https://forums.autodesk.com/t5/fusion-360-api-and-scripts/is-it-possible-to-create-setups-and-operat... 

 

Unfortunately, Contour Selection was undefined.
The .f3dhsm-template file doesn't seem to contain any Contour Selection information.

 

0 Likes
Message 7 of 7

BrianEkins
Mentor
Mentor

Currently, it's not possible to specify geometry in the CAM API. I know they are planning to add that functionality but I don't know when.

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
0 Likes