Message 1 of 6

Not applicable
04-05-2016
01:12 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm trying to create a code that deletes all the sketches in a part. I'd also like to delete all the features and their consumed sketches as well. I'm using the below code to try and delete the sketches. It runs without error but also doesn't delete anything.
SyntaxEditor Code Snippet
Sub Main() Dim oPartDoc As PartDocument oPartDoc = ThisApplication.ActiveDocument Dim oPartDef As PartComponentDefinition oPartDef = oPartDoc.ComponentDefinition Dim sketch1 As Sketch3D For Each sketch1 in oPartDef.Sketches sketch1.Delete Next End Sub
The sketches are all named sketches created using a different code.
Solved! Go to Solution.