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: 

How to select the geometry for 'contour2d'- operation

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
maurizio_manzi
223 Views, 3 Replies

How to select the geometry for 'contour2d'- operation

Hello,
for pocket2d I select the geometry:

operationInput = setup.operations.createInput('pocket2d')
operationInput.tool = tool
op_2Dpocket = setup.operations.add(operationInput)
cadcontours = op_2Dpocket.parameters.itemByName('pockets').value
selection = cadcontours.getCurveSelections()
Geometry = [mySketch.sketchCurves.item(0)]
chain = selection.createNewChainSelection() # Use chain selection
chain.inputGeometry = Geometry
cadcontours.applyCurveSelections(selection) # The default is closed chain,so just apply the chain.
 
How to select the geometry for 'contour2d'- operations ?
cadcontours = op_2Dpocket.parameters.itemByName('pockets').value # <--- 'pockets' is not allowed for contour2d.
Where can I find a list of these "names" in the API help? These are not parameters and are not displayed in the cam with the shift key.


Best regards
Maurizio
 
3 REPLIES 3
Message 2 of 4
BrianEkins
in reply to: maurizio_manzi

How the geometry is defined is described in this article in the API help.

https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-A08218F6-3885-4677-9CAD-7234BCEE85CC#CadCont...

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
Message 3 of 4
kandennti
in reply to: maurizio_manzi

Hi @maurizio_manzi .

 

I sometimes have trouble displaying the parameter name with the shift key once, but it appears after a few times.

1.png

Message 4 of 4
maurizio_manzi
in reply to: kandennti

Hello,
Thank you very much.

 
Best regards
Maurizio
 

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