08-18-2020
06:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
08-18-2020
06:26 AM
Hello @Anonymous ,
If you just want to check whether your sketch is owned by feature or not below code will work, if you have open profile sketch and still it is consumed by extrude surface, it will not be shown using below code. it will only show the sketches that are orphan (i.e. not used in any feature).
Dim oDoc As PartDocument = ThisApplication.ActiveDocument Dim oDef As PartComponentDefinition = oDoc.ComponentDefinition Dim oSketch As PlanarSketch For Each oSketch In oDef.Sketches If oSketch.IsOwnedByFeature= True ' You can use oSketch.Consumed = False as well to check here. MessageBox.Show(oSketch.Name") End If Next
If this has answered your question, please accept this as solution.
Regards,
Dutt Thakar
If this answer has solved your problem please ACCEPT SOLUTION and hit like if you found it helpful..!
Regards,
Dutt Thakar
LinkedIn
Regards,
Dutt Thakar