Solid Edge Part Type Library > HoleDataCollection Collection : Add Method |
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 |
Value | Description |
---|---|
igAddRound | |
igAll | |
igAlongAnAxis | |
igAngularDummy | |
igAsConstruction | |
igBend | |
igBendAndFaceCornerRelief | |
igBendOnlyCornerRelief | |
igBoth | Feature 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 | |
igExtend | Feature 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 | |
igInside | Feature Properties - Remove/Add Material Inside |
igInsideDimension | |
igIntersect | |
igLancedEnd | |
igLeft | Feature Properties - Project to Left |
igLinear | |
igLinearCurvatureContinuousExtension | |
igLinearTangentExtension | |
igLip | |
igLouverFormedEndType | |
igLouverLancedEndType | |
igLouverRound | |
igLouverRoundNone | |
igMitreByAngle | |
igMitreByDist | |
igMitreManufacturingCut | |
igMitreNormalToThickness | |
igMitreParallelToThickness | |
igMitreRegularCut | |
igMove | |
igMultipleEdges | |
igNatural | |
igNeutralFactorFromExcel | |
igNFType | |
igNoCornerRound | |
igNoExtend | Feature Properties - Do Not Extend |
igNone | |
igNonSymmetric | |
igNormal | |
igNormalSideDummy | Feature Properties - Normal Side |
igNoRound | |
igNullConstant | |
igOffset | |
igOutside | Feature 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 | |
igReverseNormalSideDummy | Feature Properties - Reverse Normal Side |
igRight | Feature 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 | |
igSymmetric | Feature Properties - Symmetric Extent |
igTangent | |
igTangentInterior | |
igTaperByAngle | |
igTaperByRatio | |
igTaperByRLRatio | |
igTaperDimAtBottom | |
igTaperDimAtTop | |
igTaperedEnd | |
igTaperedHole | |
igTaperedPipeThread | |
igTaperedToPlane | |
igTappedHole | |
igThickness | |
igThkInProfilePlane | |
igThkNormalToProfilePlane | |
igThreeHundredAndSixty | |
igThroughAll | |
igThroughAxis | |
igToEndOfEdge | |
igToggleToConstruction | Toggle from Design to Construction |
igToggleToDesign | Toggle 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 |
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