Solid Edge Part Type Library
Add Method
Defines the plane against which the draft angle will be applied. The normal to this plane defines the zero degree draft angle. This can be either a RefPlane object or a Topology object that contains a single planar face.
Specifies the number of faces to draft. This is the number of faces for the FaceSetArray argument.
An array of Topology that contains the faces to be drafted. The number of faces in the array must match the NumberOfFaceSets argument.
Indicates the draft angle for each face. This array must have an entry for each face in the FaceSetArray.
Member of the FeaturePropertyConstants constant set that defines the side (inside or outside) on which the draft is to be applied.
Description
Adds an occurrence of the referenced object.
Syntax
Visual Basic
Public Function Add( _
   ByVal DraftPlane As Object, _
   ByVal NumberOfFaceSets As Long, _
   ByVal FaceSetArray As Variant, _
   ByVal DraftAngleArray As Variant, _
   ByVal DraftSide As FeaturePropertyConstants _
) As Draft
Parameters
DraftPlane
Defines the plane against which the draft angle will be applied. The normal to this plane defines the zero degree draft angle. This can be either a RefPlane object or a Topology object that contains a single planar face.
NumberOfFaceSets
Specifies the number of faces to draft. This is the number of faces for the FaceSetArray argument.
FaceSetArray
An array of Topology that contains the faces to be drafted. The number of faces in the array must match the NumberOfFaceSets argument.
DraftAngleArray
Indicates the draft angle for each face. This array must have an entry for each face in the FaceSetArray.
DraftSide
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
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 defines the side (inside or outside) on which the draft is to be applied.
Example
Private Sub Form_Load()
    Dim objApp As SolidEdgeFramework.Application
    Dim objDoc As SolidEdgePart.PartDocument
    Dim objProfArr(1 To 2) As SolidEdgePart.Profile
    Dim objModel As SolidEdgePart.Model
    Dim objLines As SolidEdgeFrameworkSupport.Lines2d
    Dim objRelns1 As SolidEdgeFrameworkSupport.Relations2d
    Dim objDrfts As SolidEdgePart.Drafts
    Dim ObjFaceArr(1 To 4) As Object
    Dim objFaces As Object
    Dim objDftPln As SolidEdgePart.RefPlane
    Dim objDft As SolidEdgePart.Draft
    Dim lngStatus As Long
    Dim dblAngArr(1 To 4) As Double
    ' 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
    ' Draw the Profile
    Set objProfArr(1) = objDoc.ProfileSets.Add.Profiles.Add(pRefPlaneDisp:=objDoc.RefPlanes(1))
    Set objLines = objProfArr(1).Lines2d
    Call objLines.AddBy2Points(x1:=0, y1:=0, x2:=0.06, y2:=0)
    Call objLines.AddBy2Points(x1:=0.06, y1:=0, x2:=0.06, y2:=0.06)
    Call objLines.AddBy2Points(x1:=0.06, y1:=0.06, x2:=0, y2:=0.06)
    Call objLines.AddBy2Points(x1:=0, y1:=0.06, x2:=0, y2:=0)
    ' Relate the Lines to make the Profile closed
    Set objRelns1 = objProfArr(1).Relations2d
    Call objRelns1.AddKeypoint(Object1:=objLines(1), Index1:=igLineEnd, Object2:=objLines(2), Index2:=igLineStart)
    Call objRelns1.AddKeypoint(Object1:=objLines(2), Index1:=igLineEnd, Object2:=objLines(3), Index2:=igLineStart)
    Call objRelns1.AddKeypoint(Object1:=objLines(3), Index1:=igLineEnd, Object2:=objLines(4), Index2:=igLineStart)
    Call objRelns1.AddKeypoint(Object1:=objLines(4), Index1:=igLineEnd, Object2:=objLines(1), Index2:=igLineStart)
    ' Check for the Profile Validity
    lngStatus = objProfArr(1).End(ValidationCriteria:=igProfileClosed)
    If lngStatus <> 0 Then
        MsgBox ("Profile not closed")
    End If
    ' Create the Base Protrusion Object
    Set objModel = objDoc.Models.AddFiniteExtrudedProtrusion(NumberOfProfiles:=1, _
                                                             ProfileArray:=objProfArr, profileplaneSide:=igRight, _
                                                             ExtrusionDistance:=0.02)
    objProfArr(1).Visible = False
    ' Check the status of Base Feature
    If objModel.ExtrudedProtrusions(1).Status <> igFeatureOK Then
        MsgBox ("Error in the Creation of Base Protrusion Feature object")
    End If
    ' Create an Array of Faces and DraftPlane
    Set objDftPln = objDoc.RefPlanes(1)
    Set objFaces = objModel.ExtrudedProtrusions(1).SideFaces
    Set ObjFaceArr(1) = objFaces(1)
    Set ObjFaceArr(2) = objFaces(2)
    Set ObjFaceArr(3) = objFaces(3)
    Set ObjFaceArr(4) = objFaces(4)
    ' Create the Draft Angle Array
    dblAngArr(1) = 45 * (PI) / 180
    dblAngArr(2) = 45 * (PI) / 180
    dblAngArr(3) = 45 * (PI) / 180
    dblAngArr(4) = 45 * (PI) / 180
    ' Create a Draft collection object
    Set objDrfts = objModel.Drafts
    ' Create a Draft
    Set objDft = objDrfts.Add(DraftPlane:=objDftPln, NumberOfFaceSets:=4, _
                              FaceSetArray:=ObjFaceArr, _
                              DraftAngleArray:=dblAngArr, _
                              DraftSide:=igInside)
    If objDft.Status <> igFeatureOK Then
        MsgBox ("Add method of Drafts object failed with igInside option")
    End If
    ' Delete the Draft object
    Call objDft.Delete
    ' Create an Array of Faces and DraftPlane
    Set objDftPln = objDoc.RefPlanes(1)
    Set objFaces = objModel.ExtrudedProtrusions(1).SideFaces
    Set ObjFaceArr(1) = objFaces(1)
    Set ObjFaceArr(2) = objFaces(2)
    Set ObjFaceArr(3) = objFaces(3)
    Set ObjFaceArr(4) = objFaces(4)
    ' Create the Draft Angle Array
    dblAngArr(1) = 45 * (PI) / 180
    dblAngArr(2) = 45 * (PI) / 180
    dblAngArr(3) = 45 * (PI) / 180
    dblAngArr(4) = 45 * (PI) / 180
    ' Create a Draft collection object
    Set objDrfts = objModel.Drafts
    ' Create a Draft
    Set objDft = objDrfts.Add(DraftPlane:=objDftPln, NumberOfFaceSets:=4, _
                              FaceSetArray:=ObjFaceArr, _
                              DraftAngleArray:=dblAngArr, _
                              DraftSide:=igOutside)
    If objDft.Status <> igFeatureOK Then
        MsgBox ("Add method of Drafts object failed with igOutside option")
    End If
    ' Release objects
    Set objApp = Nothing
    Set objDoc = Nothing
    Set objModel = Nothing
    Set objRelns1 = Nothing
    Set objLines = Nothing
    Set objProfArr(2) = Nothing
    Set objProfArr(1) = Nothing
    Set objDrfts = Nothing
    Set objDft = Nothing
    Set objDftPln = Nothing
    Set ObjFaceArr(1) = Nothing
    Set ObjFaceArr(2) = Nothing
    Set ObjFaceArr(3) = Nothing
    Set ObjFaceArr(4) = Nothing
    Set objFaces = Nothing
End Sub
See Also

Drafts Collection  | Drafts Members

Send comments on this topic.