Message 1 of 6
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Is it possible to create an operation using a sketch for geometry selection?
I tried to adapt Manufacturing Workflow API Sample more specifically I took this piece from the linked code:
# limitEdge.classType() == 'adsk::fusion::BRepEdge'
cadcontours2dParam: adsk.cam.CadContours2dParameterValue = input.parameters.itemByName('machiningBoundarySel').value
chains = cadcontours2dParam.getCurveSelections()
chain = chains.createNewChainSelection()
chain.inputGeometry = [limitEdge]
cadcontours2dParam.applyCurveSelections(chains)
And tried to replace the line that sets the geometry with something like:
# sketch_lines.classType() == 'adsk::fusion::SketchLineList'
chain.inputGeometry = sketch_lines
Which gave me:
TypeError: in method 'CurveSelection__set_inputGeometry', argument 2 of type 'std::vector< adsk::core::Ptr< adsk::core::Base >,std::allocator< adsk::core::Ptr< adsk::core::Base > > > const &'
I also tried to pass a list `[sketch_lines]` instead, which gave a similar error.
* Is it possible to select an operation geometry based on a sketch?
* What types can inputGeometry handle? The only hint in the docs I found was, which is too broad to help me:
This is a read/write property whose value is an array of type Base.
Solved! Go to Solution.