- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Check Sketch with Feature
The following problem occurs in my automation process.
In my case some of the sketch closed entities are not converted as solid while using extrude feature.
So some cuts are missing.
I need to confirm whether all the closed entities are converted as solid. Otherwise i need to show user about the extrude feature conversion error.
Guide me how to identify whether all the closed profiles are converted as Solid?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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
Regards,
Dutt Thakar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
You should study the contents of this link. It describes the Function "AddForSolid()" used to prepare a sketche's profiles for an extrusion feature.
Wesley Crihfield
(Not an Autodesk Employee)