Solid Edge Part Type Library
Add Method
Member of the FeaturePropertyConstants constant set that specifies the type of hole to create. Valid values are igRegularHole, igCounterboreHole, igCountersinkHole, and igCounterdrillHole.
Specifies the diameter of the hole.
Defines the diameter of a Counterbore hole.
Defines the depth of the counterbore of a Counterbore hole.
Defines the countersink diameter of a Countersink hole.
Defines the countersink angle of a Countersink hole.
Defines the angle of the bottom of a hole with finite extents. This value is defined in degrees. To define a flat bottom hole, use the value 0. A flat bottom hole is the default.
Member of the FeaturePropertyConstants constant set that defines the treatment type of a hole. Valid values are igTappedHole, igTaperedHole, or igNone.
Member of the FeaturePropertyConstants constant set that specifies the method used to define the taper of a hole. Valid values are igTaperByAngle and igTaperByRatio.
Defines the taper of the hole. If the TaperMethod argument is set to igTaperbyAngle, the Taper argument specifies this is the taper angle in degrees. If TaperMethod is set to igTaperByRatio, Taper is the ratio value.
Description
Adds an occurrence of the referenced object.
Syntax
Visual Basic
Public Function Add( _
   ByVal HoleType As FeaturePropertyConstants, _
   ByVal HoleDiameter As Double, _
   Optional ByVal CounterboreDiameter As Variant, _
   Optional ByVal CounterboreDepth As Variant, _
   Optional ByVal CountersinkDiameter As Variant, _
   Optional ByVal CountersinkAngle As Variant, _
   Optional ByVal BottomAngle As Variant, _
   Optional ByVal TreatmentType As Variant, _
   Optional ByVal TaperMethod As Variant, _
   Optional ByVal Taper As Variant, _
   Optional ByVal ThreadMinorDiameter As Variant, _
   Optional ByVal ThreadDepthMethod As Variant, _
   Optional ByVal ThreadDepth As Variant, _
   Optional ByVal VBottomDimType As Variant, _
   Optional ByVal TaperDimType As Variant, _
   Optional ByVal CounterboreProfileLocationType As Variant, _
   Optional ByVal TaperLValue As Variant, _
   Optional ByVal TaperRValue As Variant, _
   Optional ByVal ThreadExternalDiameter As Variant, _
   Optional ByVal ThreadDescription As Variant, _
   Optional ByVal IgnoreSavedDefaultValues As Variant _
) As HoleData
Parameters
HoleType
ValueDescription
igAddRound
igAll
igAlongAnAxis
igAngularDummy
igAsConstruction
igBend
igBendAndFaceCornerRelief
igBendOnlyCornerRelief
igBothFeature Properties - Both
igChainedCornerRelief
igChamfer2Setbacks
igChamfer45degSetback
igChamferAngleSetback
igCircular
igCloseCornerCircleCutout
igCloseCornerClosed
igCloseCornerNone
igCloseCornerOpen
igClosed
igCloseFaces
igConcave
igConstantRadiusArc
igConstRadiusRound
igContinuous
igConvex
igCopy
igCornerRound
igCounterboreHole
igCounterboreProfileIsAtBottom
igCounterboreProfileIsAtTop
igCounterdrillHole
igCountersinkHole
igCurvatureContinuous
igCurvatureContinuousInterior
igCurveSetSeperator
igDeleteFaceHeal
igDelSMFaceBoth
igDelSMFaceNone
igDelSystemRelief
igDelZeroBendRadius
igDevelopableSurface
igEdgeBasedCrossSection
igEdgesByLoop
igEdgesByVertex
igEnd
igEndCaps
igEqualOffset
igEquationType
igExtendFeature Properties - Extend
igExtendBendRelief
igFacesTouchingCurvesOnly
igFilletBendRelief
igFinite
igFlangeCenterOfEdge
igFlangeEndFromEndEdge
igFlangeEndOnEndEdge
igFlangeFromBothEndsOfEdge
igFlangeFromDefinedStartPoint
igFlangeFullEdge
igFlangeMatchFace
igFlangeOffset
igFlangeStartFromEndEdge
igFlangeStartOnEndEdge
igFlatten
igFormedEnd
igFromNonReferenceEnd
igFromReferenceEnd
igFromTo
igFull
igGroove
igHemTypeCenteredLoop
igHemTypeClosed
igHemTypeClosedLoop
igHemTypeCurl
igHemTypeOpen
igHemTypeOpenLoop
igHemTypeSFlange
igIgnoreBlends
igInsideFeature Properties - Remove/Add Material Inside
igInsideDimension
igIntersect
igLancedEnd
igLeftFeature Properties - Project to Left
igLinear
igLinearCurvatureContinuousExtension
igLinearTangentExtension
igLip
igLouverFormedEndType
igLouverLancedEndType
igLouverRound
igLouverRoundNone
igMitreByAngle
igMitreByDist
igMitreManufacturingCut
igMitreNormalToThickness
igMitreParallelToThickness
igMitreRegularCut
igMove
igMultipleEdges
igNatural
igNeutralFactorFromExcel
igNFType
igNoCornerRound
igNoExtendFeature Properties - Do Not Extend
igNone
igNonSymmetric
igNormal
igNormalSideDummyFeature Properties - Normal Side
igNoRound
igNullConstant
igOffset
igOutsideFeature Properties - Remove/Add Material Outside
igOutsideDimension
igOverlapFaces
igParallelDummy
igParallelToPlane
igPartingFromCurve
igPartingFromEdge
igPartingFromPlane
igPartingFromSurface
igPatternAlongCurve
igPatternCircular
igPatternFillRegion
igPatternMirror
igPatternMountingBoss
igPatternRectangular
igPatternUserDefined
igPeriodic
igProfileBasedCrossSection
igProjectOptionProject
igProjectOptionWrap
igPunchedEnd
igRadial
igRaisedCounterboreSlot
igRecessedCounterboreSlot
igRecreateBlends
igRectangularBendRelief
igReflective
igRegularHole
igRegularSlot
igRegularThread
igRemoveBoundaries
igRemoveExternalBoundaries
igRemoveInternalBoundaries
igReverseNormal
igReverseNormalSideDummyFeature Properties - Reverse Normal Side
igRightFeature Properties - Project to Right
igRipBendRelief
igRipCornerRelief
igRndCapAcrossSharpEdges
igRndMiterAtCorner
igRndPreserveTopologyOff
igRndPreserveTopologyOn
igRndRollAcrossSharpEdges
igRndRollAcrossTangentEdgesOff
igRndRollAcrossTangentEdgesOn
igRndRollAlongBlendEdgesOff
igRndRollAlongBlendEdgesOn
igRndRollAroundCorner
igRoundAllVertexSetback
igRoundEndVertexEdgeSetback
igRoundSetbackIsAbsolute
igRoundSetbackIsRelative
igRoundSingleVertexSetback
igRoundStartVertexEdgeSetback
igRoundVertexEdgeSetback
igShowBoundaries
igSideInfoSetSeperator
igSingleEdge
igSMClearanceCutout
igSMFaceCutout
igSMMidPlaneCutout
igSplit
igSplitAngle1Left
igSplitAngle1Right
igSplitDraft
igStart
igStepDraft
igStepDraftPerpendicular
igStraightPipeThread
igSubtract
igSweepAlignArcLength
igSweepAlignNormal
igSweepAlignParallel
igSweepAlignParametrically
igSweepC1Continuity
igSweepC2Continuity
igSweepMergeAll
igSweepMergeAlongPath
igSweepMergeNone
igSweepScaleNone
igSweepScaleStartAndEnd
igSweepTwistNone
igSweepTwistStartAndEnd
igSweepTwistTurns
igSweepTwistTurnsPerUnitLength
igSymmetricFeature Properties - Symmetric Extent
igTangent
igTangentInterior
igTaperByAngle
igTaperByRatio
igTaperByRLRatio
igTaperDimAtBottom
igTaperDimAtTop
igTaperedEnd
igTaperedHole
igTaperedPipeThread
igTaperedToPlane
igTappedHole
igThickness
igThkInProfilePlane
igThkNormalToProfilePlane
igThreeHundredAndSixty
igThroughAll
igThroughAxis
igToEndOfEdge
igToggleToConstructionToggle from Design to Construction
igToggleToDesignToggle from Construction to Design
igToKeyPoint
igToNext
igTreatmentCircleCutout
igTreatmentCrown
igTreatmentDraft
igTreatmentFormedFeatureDisplayAsCenterMark
igTreatmentFormedFeatureDisplayAsModeled
igTreatmentFormedFeatureDisplayAsSketch
igTreatmentFormedFeatureDisplayAsSketchAndCenterMark
igTreatmentIntersect
igTreatmentMiterRelief
igTreatmentOff
igTreatmentRectangularCutout
igTreatmentUCutout
igTreatmentVCutout
igUnequalOffset
igUnite
igUShaped
igVarRadiusRound
igVBottomDimToFlat
igVBottomDimToV
igVShaped
igWeldGrooveCapProject
igWeldGrooveCapSameAsTop
igWeldGrooveCapSurface
Member of the FeaturePropertyConstants constant set that specifies the type of hole to create. Valid values are igRegularHole, igCounterboreHole, igCountersinkHole, and igCounterdrillHole.
HoleDiameter
Specifies the diameter of the hole.
CounterboreDiameter
Defines the diameter of a Counterbore hole.
CounterboreDepth
Defines the depth of the counterbore of a Counterbore hole.
CountersinkDiameter
Defines the countersink diameter of a Countersink hole.
CountersinkAngle
Defines the countersink angle of a Countersink hole.
BottomAngle
Defines the angle of the bottom of a hole with finite extents. This value is defined in degrees. To define a flat bottom hole, use the value 0. A flat bottom hole is the default.
TreatmentType
Member of the FeaturePropertyConstants constant set that defines the treatment type of a hole. Valid values are igTappedHole, igTaperedHole, or igNone.
TaperMethod
Member of the FeaturePropertyConstants constant set that specifies the method used to define the taper of a hole. Valid values are igTaperByAngle and igTaperByRatio.
Taper
Defines the taper of the hole. If the TaperMethod argument is set to igTaperbyAngle, the Taper argument specifies this is the taper angle in degrees. If TaperMethod is set to igTaperByRatio, Taper is the ratio value.
ThreadMinorDiameter
ThreadDepthMethod
ThreadDepth
VBottomDimType
TaperDimType
CounterboreProfileLocationType
TaperLValue
TaperRValue
ThreadExternalDiameter
ThreadDescription
IgnoreSavedDefaultValues
Example
Private Sub Form_Load()
    Dim objApp As SolidEdgeFramework.Application
    Dim objDoc As SolidEdgePart.PartDocument
    Dim objBaseProfile As SolidEdgePart.Profile
    Dim objBaseProfArray(1 To 2) As SolidEdgePart.Profile
    Dim objBase As SolidEdgePart.Model
    Dim objRP As SolidEdgePart.RefPlane
    Dim objHoleData(1 To 6) As SolidEdgePart.HoleData
    Dim objHoleProfile(1 To 6) As SolidEdgePart.Profile
    Dim objHole(1 To 6) As SolidEdgePart.Hole
    Dim lngStatus As Long
    ' Report errors
    Const PI = 3.14159265358979
    ' Create/get the application with specific settings
    On Error Resume Next
    Set objApp = GetObject(, "SolidEdge.Application")
    If Err Then
        Err.Clear
        Set objApp = CreateObject("SolidEdge.Application")
        Set objDoc = objApp.Documents.Add("SolidEdge.PartDocument")
        objApp.Visible = True
    Else
        Set objDoc = objApp.ActiveDocument
    End If
    ' *** creating the an extruded protrusion base feature
    ' creating a circular profile for the base feature and validating it
    Set objBaseProfile = objDoc.ProfileSets.Add.Profiles.Add(pRefPlaneDisp:=objDoc.RefPlanes(1))
    Call objBaseProfile.Circles2d.AddByCenterRadius(x:=0, y:=0, Radius:=0.1)
    lngStatus = objBaseProfile.End(ValidationCriteria:=igProfileClosed)
    If (lngStatus <> 0) Then
        MsgBox "Profile for the base feature is not closed"
    End If
    ' creating the extruded protrusion and validating it
    Set objBaseProfArray(1) = objBaseProfile
    Set objBase = objDoc.Models.AddFiniteExtrudedProtrusion(NumberOfProfiles:=1, _
                                                            ProfileArray:=objBaseProfArray, ProfilePlaneSide:=igSymmetric, ExtrusionDistance:=0.05)
    objBaseProfile.Visible = False
    If (objBase.ExtrudedProtrusions(1).Status <> igFeatureOK) Then
        MsgBox "AddFiniteExtrudedProtrusion method of models object fails"
    End If
    ' *** creating a reference plane coincident on the top face of the base feature
    Set objRP = objDoc.RefPlanes.AddParallelByDistance(ParentPlane:=objBase.ExtrudedProtrusions(1).Faces(facetype:=igQueryAll).Item(2), _
                                                       Distance:=0, NormalSide:=igRight)
    ' *** creating a Regular Hole using the Holedatacollection object
    ' creating the hole data for a regular hole
    Set objHoleData(1) = objDoc.HoleDataCollection.Add(HoleType:=igRegularHole, _
                                                       HoleDiameter:=0.01, BottomAngle:=90)
    ' creating a profile for the regular hole and validating it
    Set objHoleProfile(1) = objDoc.ProfileSets.Add.Profiles.Add(pRefPlaneDisp:=objRP)
    Call objHoleProfile(1).Holes2d.Add(xcenter:=0, ycenter:=0)
    lngStatus = objHoleProfile(1).End(ValidationCriteria:=igProfileClosed)
    If (lngStatus <> 0) Then
        MsgBox "Profile for the regular hole is not closed"
    End If
    ' creating the regular hole on the base feature and validating it
    Set objHole(1) = objBase.Holes.AddFinite(Profile:=objHoleProfile(1), _
                                             ProfilePlaneSide:=igLeft, FiniteDepth:=0.02, Data:=objHoleData(1))
    'Turn off the profile
    objHoleProfile(1).Visible = False
    ' USER DISPLAY
    Dim i As Integer
    ' Release objects
    Set objApp = Nothing
    Set objDoc = Nothing
    Set objBaseProfile = Nothing
    Set objBaseProfArray(1) = Nothing
    Set objBase = Nothing
    Set objRP = Nothing
    For i = 1 To 6
        Set objHoleData(i) = Nothing
        Set objHoleProfile(i) = Nothing
        Set objHole(i) = Nothing
    Next i
End Sub
See Also

HoleDataCollection Collection  | HoleDataCollection Members