Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
Anonymous
291 Views, 2 Replies

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?

dutt.thakar
in reply to: Anonymous

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
WCrihfield
in reply to: Anonymous

You should study the contents of this link.  It describes the Function "AddForSolid()" used to prepare a sketche's profiles for an extrusion feature.

Profiles.AddForSolid Method 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)