I find that deleting (many) curves via the API is extremely slow (on the order of 200ms to 250ms per curve). Is there an API call I can make that will delete a list of curves?
If I can't batch delete I'm going to have to collect the lines i want to keep and project them into a new sketch instead which is silly
This is a good request and something I've added to our backlog and I hope we can provide it soon.
Deleting curves is still insanely slow.
I have a situation where I construct geometry, offset it, and then want to delete the original geometry.
In some cases before I was able to directly construct the offset geometry, but in this case that is proving ... awkward.
Is there a fast way to delete a set of curves?
Hello,
Did you try "Product::deleteEntities" to batch delete curves? The following sample demos how to delete lines and arcs from a sketch.
Thanks,
Marshal
import adsk.core, adsk.fusion, traceback def run(context): ui = None try: app = adsk.core.Application.get() ui = app.userInterface design = adsk.fusion.Design.cast(app.activeProduct) root = design.rootComponent sketch = root.sketches.item(0) entities = adsk.core.ObjectCollection.create() for line in sketch.sketchCurves.sketchLines: entities.add(line) for arc in sketch.sketchCurves.sketchArcs: entities.add(arc) design.deleteEntities(entities) except: if ui: ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))