Only allow sketch entities if directly associated to an extruded feature
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a simple ipt file (attached)
It is a simple rectangular plate with 13 holes through on a pitch circle.
I have used a "circle" to construct the "Pitch Circle" and a "line" to construct the top dead centre of the circle.
I have then added a circle to use as a hole feature and used the circular pattern to make the holes equi-spaced around the circle.
This circle is then extruded "Through All".
My question is, How can I eliminate the construction "Circles" and "Lines" from the following code, only allowing sketch entites that are directly associated to an extruded feature to be accepted?
Public Function WriteDxfSketchEntities(Doc As PartDocument, sketch As PlanarSketch) As Boolean
Dim partCompDef As PartComponentDefinition
Dim ExtFeat As ExtrudeFeature
Set PartCompDef = Doc.ComponentDefinition
For Each ExtFeat In PartCompDef.Features.ExtrudeFeatures
If sketch Is ExtFeat.Profile.Parent Then
With extFeat
Select Case .ExtentType
Case kDistanceExtent
Depth = .Extent.Distance.ModelValue * 10
If Depth = Zsize Then Call GetExrusionData(Doc, sketch)
Case kThroughAllExtent
Call GetExrusionData(Doc, sketch)
End Select
End With
End If
Next
End Function
Many thanks in advance!!!!