Message 1 of 9
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I create a drill operation and select my cylinder-Face as geometry (drill position),
but in the line "selection = cadcontours.getCurveSelections()" I get an error message:
"AttributeError: 'CadObjectParameterValue' object has no attribute 'getCurveSelections'"
Code:
# drillFace is my cylinder-face (I can select it manually in the operation)
operationInput = setup.operations.createInput('drill')
operationInput.tool = toolDrill
op_drill = setup.operations.add(operationInput
op_drill.parameters.itemByName('holeMode').expression = "'selection-faces'"
cadcontours: adsk.cam.CadContours2dParameterValue = op_drill.parameters.itemByName('holeFaces').value
selection = cadcontours.getCurveSelections() # <<<--- Error see below
faceContourSel: adsk.cam.FaceContourSelection = selection.createNewFaceContourSelection()
contour selection
faceContourSel.inputGeometry = [drillFace]
cadcontours.applyCurveSelections(selection)
# ERROR:
#selection = cadcontours.getCurveSelections()
#AttributeError: 'CadObjectParameterValue' object has no attribute 'getCurveSelections'
Best regards
Maurizio
Solved! Go to Solution.