Determine which feature was created by using a specific SketchBlock

Determine which feature was created by using a specific SketchBlock

MD_
Contributor Contributor
163 Views
0 Replies
Message 1 of 1

Determine which feature was created by using a specific SketchBlock

MD_
Contributor
Contributor

Similar to this post: Determine which feature was created by using a specific sketch, API - Autodesk Community  

 

Is this possible for sketchblocks?  Can the feature(s) using a sketchblock be found in a similar way using the dependents property?  I tried the following but keep getting an error:

 

Dim oPartDoc As PartDocument = ThisDoc.Document
Dim oPartCompDef As PartComponentDefinition = oPartDoc.ComponentDefinition
Dim oSketchBlockDef As SketchBlockDefinition
For Each oSketchBlockDef In oPartCompDef.SketchBlockDefinitions
	For Each oDependent In oSketchBlockDef.Dependents
		'  ... Error "Object reference not set to an instance of an object."
	Next
Next

 

0 Likes
164 Views
0 Replies
Replies (0)