Solid Edge Assembly Type Library
Add Method
Total number of scope parts to be considered for this hole.
Array of scope parts.
Total number of profiles.
Array of profiles.
Specify Extent type.
Specify Hole depth.
Only when creating a feature with a from/to extent. This specifies the plane where the cut should originate.
Only when creating a feature with a from/to extent. This specifies the plane where the cut should end.
Specifies a point where the profile should be extended to modify the part.
Description
Adds an Assembly Feature "Hole" in an Assembly Document.
Syntax
Visual Basic
Public Function Add( _
   ByVal nNumScopeParts As ULong, _
   ByRef pScopeParts() As Unknown, _
   ByVal nNumProfiles As ULong, _
   ByRef pProfiles() As Unknown, _
   ByRef pExtentSide As FeaturePropertyConstants, _
   ByVal pHoledata As Unknown, _
   ByVal ExtentType As FeaturePropertyConstants, _
   ByRef pHoleDepth As Double, _
   ByVal pFromSurfOrPlane As Unknown, _
   ByVal pToSurfOrPlane As Unknown, _
   ByVal pKeyPoint As Unknown, _
   ByRef pKeyPointFlags As KeyPointExtentConstants _
) As AssemblyFeaturesHole
Parameters
nNumScopeParts
Total number of scope parts to be considered for this hole.
pScopeParts
Array of scope parts.
nNumProfiles
Total number of profiles.
pProfiles
Array of profiles.
pExtentSide
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
igPatternByTable
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
pHoledata
ExtentType
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
igPatternByTable
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
Specify Extent type.
pHoleDepth
Specify Hole depth.
pFromSurfOrPlane
Only when creating a feature with a from/to extent. This specifies the plane where the cut should originate.
pToSurfOrPlane
Only when creating a feature with a from/to extent. This specifies the plane where the cut should end.
pKeyPoint
Specifies a point where the profile should be extended to modify the part.
pKeyPointFlags
ValueDescription
igInteriorReverseTangentNormalKey-point Extent - Interior Reverse Tangent Normal
igInteriorTangentNormalKey-point Extent - Interior Tangent Normal
igReverseTangentNormalKey-point Extent - Reverse Tangent Normal
igTangentNormalKey-point Extent - Tangent Normal
Example
Imports System.IO
Imports System.Runtime.InteropServices
Public Class Form1
    Function GetTrainingFolder() As DirectoryInfo
        Dim objInstallData As SEInstallDataLib.SEInstallData = Nothing
        Dim objInstallFolder As DirectoryInfo = Nothing
        Dim objTrainingFolder As DirectoryInfo = Nothing

        Try
            objInstallData = New SEInstallDataLib.SEInstallData
            objInstallFolder = New DirectoryInfo(objInstallData.GetInstalledPath())
            objTrainingFolder = New DirectoryInfo(Path.Combine(objInstallFolder.Parent.FullName, "Training"))
        Catch
        Finally
            If Not (objInstallData Is Nothing) Then
                Marshal.FinalReleaseComObject(objInstallData)
                objInstallData = Nothing
            End If
        End Try

        Return objTrainingFolder
    End Function

    Private Sub AssemblyFeaturesHoles_Add_Click(sender As Object, e As EventArgs) Handles AssemblyFeaturesHoles_Add.Click
        Dim objApplication As SolidEdgeFramework.Application = Nothing
        Dim objAssemblyDocument As SolidEdgeAssembly.AssemblyDocument = Nothing
        Dim SEInstallDir As DirectoryInfo
        Dim objOccurrences As SolidEdgeAssembly.Occurrences = Nothing
        Dim objOccurrence As SolidEdgeAssembly.Occurrence = Nothing
        Dim objLayouts As SolidEdgeAssembly.Layouts = Nothing
        Dim objLayout As SolidEdgeAssembly.Layout = Nothing
        Dim objLayoutProfile As SolidEdgePart.Profile = Nothing
        Dim objAsmFeatHoles As SolidEdgeAssembly.AssemblyFeaturesHoles = Nothing
        Dim objAsmFeatHole As SolidEdgeAssembly.AssemblyFeaturesHole = Nothing
        Dim ExtentType As SolidEdgePart.FeaturePropertyConstants = Nothing
        Dim ExtentSide As SolidEdgePart.FeaturePropertyConstants = Nothing
        Dim ProfileSide As SolidEdgePart.FeaturePropertyConstants = Nothing
        Dim objProfile As Object
        Dim arrProfile(1) As Object
        Dim pFromSurfOrPlane As Object
        Dim pKeyPoint As Object
        Dim pToSurfOrPlane As Object
        Dim pKeyPointFlags As SolidEdgePart.KeyPointExtentConstants
        Dim arrScopeParts() As Object
        Dim nParts As Short
        Dim i As Short
        Dim objHoleData As Object = Nothing
        Try
            objApplication = Marshal.GetActiveObject("SolidEdge.Application")
            SEInstallDir = GetTrainingFolder()
            objAssemblyDocument = objApplication.Documents.Open(SEInstallDir.FullName + "\carrier.asm")
            'objAssemblyDocument = objApplication.ActiveDocument
            objHoleData = objAssemblyDocument.HoleDataCollection.Add(HoleType:=SolidEdgePart.FeaturePropertyConstants.igCounterboreHole, _
                                                   HoleDiameter:=0.005, CounterboreDiameter:=0.007, _
                                                   CounterboreDepth:=0.0075)
            objAsmFeatHoles = objAssemblyDocument.AssemblyFeatures.AssemblyFeaturesHoles

            Dim objAsmRefPlanes As SolidEdgeAssembly.AsmRefPlanes
            Dim objAsmRefPlane As SolidEdgeAssembly.AsmRefPlane
            objAsmRefPlanes = objAssemblyDocument.AsmRefPlanes
            objAsmRefPlane = objAsmRefPlanes.AddParallelByDistance(objAsmRefPlanes(0), 0.02111)

            'Get the Layouts Collection
            objLayouts = objAssemblyDocument.Layouts
            'Create a new Layout
            objLayout = objLayouts.Add(AsmRefPlane:=objAsmRefPlane)

            'Get the Profile object from Layout
            objLayoutProfile = objLayout.Profile
            'Now draw a circle
            objLayoutProfile.Holes2d.Add(0.0, 0.03)

            objProfile = objLayout.Profile ' This is the same as a part profile.
            arrProfile(0) = objProfile '0 based index

            'Setup the scoped parts - use all the refrences

            nParts = objAssemblyDocument.Occurrences.Count
            ReDim arrScopeParts(nParts)
            'Has to give the parts to be modified by the feature
            For i = 1 To objAssemblyDocument.Occurrences.Count
                arrScopeParts(i - 1) = objAssemblyDocument.Occurrences.Item(i)
            Next
            'Exent type such as finite, through all , etc.
            ExtentType = SolidEdgeConstants.FeaturePropertyConstants.igThroughAll

            'Profile side.
            ExtentSide = SolidEdgeConstants.FeaturePropertyConstants.igLeft

            'Extent side - needed for finite extent type
            ProfileSide = SolidEdgeConstants.FeaturePropertyConstants.igLeft
            pKeyPoint = 0
            pFromSurfOrPlane = 0
            pToSurfOrPlane = 0

            objAsmFeatHole = objAsmFeatHoles.Add(4, arrScopeParts, 1, arrProfile, ExtentSide, objHoleData, ExtentType, 0.03, pFromSurfOrPlane, pToSurfOrPlane, pKeyPoint, pKeyPointFlags)

            'Update Path finder
            objAssemblyDocument.UpdatePathfinder(SolidEdgeAssembly.AssemblyPathfinderUpdateConstants.seRebuild)

        Catch ex As Exception
            MsgBox(ex.ToString)
            Clipboard.SetText(ex.ToString)
        End Try
    End Sub
End Class
See Also

AssemblyFeaturesHoles Collection  | AssemblyFeaturesHoles Members  | Solid Edge V17 - What's New