Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
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