Delete projection created with command "intersectWithSketchPlane"

Delete projection created with command "intersectWithSketchPlane"

vitor.carneiro
Participant Participant
506 Views
1 Reply
Message 1 of 2

Delete projection created with command "intersectWithSketchPlane"

vitor.carneiro
Participant
Participant

Hi,

I would like help to delete the created projection (purple line) when performing the command of intersection of a plane with an object.
I need to erase the line without erasing the splines and offsets that I created right next, as my application depends on it.

See attached photo of the result and my code in python.

I thank the attention!

 

Vitor Urel.

0 Likes
507 Views
1 Reply
Reply (1)
Message 2 of 2

BrianEkins
Mentor
Mentor

The intersection command results in sketch entities being added to the sketch.  You can access the lines using the sketch.sketchCurves.sketchLines collection.  For example, the following will delete the first line in the sketch.

 

sk.sketchCurves[0].deleteMe()

 

You'll need some way to determine which geometry in the sketch you want to delete.  In your case maybe it can be by type and you can delete all of the lines.  If you only need to delete some lines you'll need to figure out some other way to differentiate the lines you want to delete.  Possibly their location or some other geometric difference.

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