Solid Edge Part Type Library
AddSweptProtrusion Method
Specifies the number of Curve objects used in the construction of the swept protrusion feature.
Contains Profile and/or Edge objects. The size of the array is equal to the value of NumCurves.
The size of the array is equal to the value of NumCurves. Contains members of the FeaturePropertyConstants constant set (igProfileBasedCrossSection, igEdgeBasedCrossSection) that specify whether the corresponding member of the TraceCurves array is a Profile or Edge object.
Specifies the number of Section objects used in the construction of the swept protrusion feature. This value is equal to the count of CrossSections, CrossSectionTypes, and Origins.
Contains Profile and/or Edge objects. The size of the array is equal to the value of NumSections.
He size of the array is equal to the value of NumSections. Contains members of the FeaturePropertyConstants constant set (igProfileBasedCrossSection and igEdgeBasedCrossSection) that specify whether the corresponding member of the CrossSections array is a Profile or Edge object.
Contains the points that define the start points of the corresponding cross sections. Each point is represented as an array of two Doubles (for example, Dim dblOrigin(2) as Double; Dim Origins() as Variant). For members of this array that correspond to periodic cross sections (circles and ellipses), specify a value of 0 instead of an array that represents a point.
Set the value to 0.
Set the value to the constant igleft.
Set the value to the constant igNone.
Set the value to 0.
Set the value to Nothing.
Set the value to the constant igNone.
Set the value to 0.
Set the value to Nothing.
Description
Creates a SweptProtrusion object.
Syntax
Visual Basic
Public Function AddSweptProtrusion( _
   ByVal NumCurves As Long, _
   ByVal TraceCurves As Variant, _
   ByVal TraceCurveTypes As Variant, _
   ByVal NumSections As Long, _
   ByVal CrossSections As Variant, _
   ByVal CrossSectionTypes As Variant, _
   ByVal Origins As Variant, _
   ByVal SegmentMaps As Variant, _
   ByVal MaterialSide As FeaturePropertyConstants, _
   ByVal StartExtentType As FeaturePropertyConstants, _
   ByVal StartExtentDistance As Double, _
   ByVal StartSurfaceOrRefPlane As Object, _
   ByVal EndExtentType As FeaturePropertyConstants, _
   ByVal EndExtentDistance As Double, _
   ByVal EndSurfaceOrRefPlane As Object _
) As Model
Parameters
NumCurves
Specifies the number of Curve objects used in the construction of the swept protrusion feature.
TraceCurves
Contains Profile and/or Edge objects. The size of the array is equal to the value of NumCurves.
TraceCurveTypes
The size of the array is equal to the value of NumCurves. Contains members of the FeaturePropertyConstants constant set (igProfileBasedCrossSection, igEdgeBasedCrossSection) that specify whether the corresponding member of the TraceCurves array is a Profile or Edge object.
NumSections
Specifies the number of Section objects used in the construction of the swept protrusion feature. This value is equal to the count of CrossSections, CrossSectionTypes, and Origins.
CrossSections
Contains Profile and/or Edge objects. The size of the array is equal to the value of NumSections.
CrossSectionTypes
He size of the array is equal to the value of NumSections. Contains members of the FeaturePropertyConstants constant set (igProfileBasedCrossSection and igEdgeBasedCrossSection) that specify whether the corresponding member of the CrossSections array is a Profile or Edge object.
Origins
Contains the points that define the start points of the corresponding cross sections. Each point is represented as an array of two Doubles (for example, Dim dblOrigin(2) as Double; Dim Origins() as Variant). For members of this array that correspond to periodic cross sections (circles and ellipses), specify a value of 0 instead of an array that represents a point.
SegmentMaps
Set the value to 0.
MaterialSide
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
Set the value to the constant igleft.
StartExtentType
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
Set the value to the constant igNone.
StartExtentDistance
Set the value to 0.
StartSurfaceOrRefPlane
Set the value to Nothing.
EndExtentType
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
Set the value to the constant igNone.
EndExtentDistance
Set the value to 0.
EndSurfaceOrRefPlane
Set the value to Nothing.
Remarks
Typically, this method is used to create a protrusion that is to be the base feature for a model. Additional swept protrusions added to the model are created through methods that belong to the model's SweptProtrusions collection object. This method fails if called more than one time because only one base feature (or Model) is valid in a Part file.
Example
Private Sub Form_Load()
    Dim objApp As SolidEdgeFramework.Application
    Dim objDoc As SolidEdgePart.PartDocument
    Dim objTraceprofile(1 To 2) As SolidEdgePart.Profile
    Dim objLine1 As SolidEdgeFrameworkSupport.Line2d
    Dim objLine2 As SolidEdgeFrameworkSupport.Line2d
    Dim objArc1 As SolidEdgeFrameworkSupport.Arc2d
    Dim objArc2 As SolidEdgeFrameworkSupport.Arc2d
    Dim objRelations As SolidEdgeFrameworkSupport.Relations2d
    Dim objCSRefPlane1 As SolidEdgePart.RefPlane
    Dim objCSRefPlane2 As SolidEdgePart.RefPlane
    Dim objCSProfile(1 To 2) As SolidEdgePart.Profile
    Dim vOriginArray(2) As Variant
    Dim objModel As SolidEdgePart.Model
    Dim lngStatus As Long
    Dim lngTraceCurveTypes(1 To 2) As Long
    Dim lngCrossSectionTypes(1 To 2) 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
    On Error GoTo 0
    '************
    ' CASE 1 : ONE PATH STEP & ONE CROSS_SECTION STEP
    '************
    ' *** creating a base SweptProtrusion feature
    ' Creating the profiles (PATH STEP) and validating them
    Set objTraceprofile(1) = objDoc.ProfileSets.Add.Profiles.Add(pRefPlaneDisp:=objDoc.RefPlanes(1))
    Set objLine1 = objTraceprofile(1).Lines2d.AddBy2Points(x1:=0.05, y1:=0, x2:=0.05, y2:=0.15)
    Set objArc1 = objTraceprofile(1).Arcs2d.AddByCenterStartEnd(xCenter:=0.025, yCenter:=0.15, _
                                                                xStart:=0.05, yStart:=0.15, xEnd:=0, yEnd:=0.15)
    Set objLine2 = objTraceprofile(1).Lines2d.AddBy2Points(x1:=0, y1:=0.15, x2:=0, y2:=0)
    Set objArc2 = objTraceprofile(1).Arcs2d.AddByCenterStartEnd(xCenter:=0.025, yCenter:=0, _
                                                                xStart:=0, yStart:=0, xEnd:=0.05, yEnd:=0)
    Set objRelations = objTraceprofile(1).Relations2d
    objRelations.AddKeypoint object1:=objLine1, index1:=igLineEnd, object2:=objArc1, index2:=igArcStart
    objRelations.AddKeypoint object1:=objArc1, index1:=igArcEnd, object2:=objLine2, index2:=igLineStart
    objRelations.AddKeypoint object1:=objLine2, index1:=igLineEnd, object2:=objArc2, index2:=igArcStart
    objRelations.AddKeypoint object1:=objArc2, index1:=igArcEnd, object2:=objLine1, index2:=igLineStart
    ' Validate the Profile
    lngStatus = objTraceprofile(1).End(ValidationCriteria:=igProfileClosed)
    If lngStatus <> 0 Then
        MsgBox ("Trace profile is not closed")
    End If
    ' Creating the profiles (CROSS_SECTION STEP) and validating them
    Set objCSRefPlane1 = objDoc.RefPlanes.AddNormalToCurve( _
                         Curve:=objLine1, _
                         PlanePoint:=igCurveStart, _
                         OrientationPlaneOrPivot:=objDoc.RefPlanes(1), _
                         PivotOrigin:=igPivotEnd, _
                         local:=True, _
                         ParentCurve:=objTraceprofile(1))
    Set objCSProfile(1) = objDoc.ProfileSets.Add.Profiles.Add(pRefPlaneDisp:=objCSRefPlane1)
    Call objCSProfile(1).Circles2d.AddByCenterRadius(x:=0, y:=0, Radius:=0.01)
    ' Validating the Profile
    lngStatus = objCSProfile(1).End(ValidationCriteria:=igProfileClosed)
    If lngStatus <> 0 Then
        MsgBox ("Cross-section profile is not closed")
    End If
    ' Setting the Constants
    lngTraceCurveTypes(1) = igProfileBasedCrossSection
    lngCrossSectionTypes(1) = igProfileBasedCrossSection
    vOriginArray(1) = 0

    Set objModel = objDoc.Models.AddSweptProtrusion(NumCurves:=1, _
                                                    TraceCurves:=objTraceprofile, TraceCurveTypes:=lngTraceCurveTypes, _
                                                    NumSections:=1, CrossSections:=objCSProfile, _
                                                    CrossSectionTypes:=lngCrossSectionTypes, origins:=vOriginArray, _
                                                    SegmentMaps:=0, MaterialSide:=igLeft, StartExtentType:=igNone, _
                                                    StartExtentDistance:=0, StartSurfaceOrRefPlane:=Nothing, _
                                                    EndExtentType:=igNone, EndExtentDistance:=0, EndSurfaceOrRefPlane:=Nothing)
    objTraceprofile(1).Visible = False
    objCSProfile(1).Visible = False
    ' USER DISPLAY
    ' Release objects
    Set objApp = Nothing
    Set objDoc = Nothing
    Set objTraceprofile(1) = Nothing
    Set objTraceprofile(2) = Nothing
    Set objLine1 = Nothing
    Set objLine2 = Nothing
    Set objArc1 = Nothing
    Set objArc2 = Nothing
    Set objRelations = Nothing
    Set objCSRefPlane1 = Nothing
    Set objCSRefPlane2 = Nothing
    Set objCSProfile(1) = Nothing
    Set objCSProfile(2) = Nothing
    Set vOriginArray(1) = Nothing
    Set vOriginArray(2) = Nothing
    Set objModel = Nothing
End Sub
See Also

Models Collection  | Models Members