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!!!!
Hi,
I may not get what you are trying to do. As I understand, the sketch of the feature has one circle which is the base circle to generate circular circles. While you do not allow the base circle to be involved with the extrude feature. If yes, two ways I can think of:
1) Create the profile with the elements you want to have.
Profiles.AddForSolid has the arguments contains sketch curves as well as text boxes. If sketch curves are specified, then the profile created by this method will include profile paths that are comprised of the exact set of sketch curves specified.
2) Set the base circle as Construction object. every sketch eneity has the property. If it is construction entity, it will not be included in the feature creation.
SketchEntity.Construction = True