Solid Edge Part Type Library
Reorder Method
Specifies the feature object for which the referenced feature object is to be inserted in front of or behind.
Specifies if the active feature object is to be placed before or after the target object. If this argument is True, the active feature object is inserted before the target object. If this argument is False, the feature object is placed after the target object.
Description
Inserts the referenced object in front of or behind another feature.
Syntax
Visual Basic
Public Sub Reorder( _
   ByVal TargetFeature As Object, _
   ByVal InsertBefore As Boolean _
) 
Parameters
TargetFeature
Specifies the feature object for which the referenced feature object is to be inserted in front of or behind.
InsertBefore
Specifies if the active feature object is to be placed before or after the target object. If this argument is True, the active feature object is inserted before the target object. If this argument is False, the feature object is placed after the target object.
Example
Private Sub Form_Load()
    Dim objApp As SolidEdgeFramework.Application
    Dim objDoc As SolidEdgePart.PartDocument
    Dim objBaseProfile As SolidEdgePart.Profile
    Dim objBaseProfileArray(1 To 2) As SolidEdgePart.Profile
    Dim objBaseModel As SolidEdgePart.Model
    Dim objProfile As SolidEdgePart.Profile
    Dim objLine As SolidEdgeFrameworkSupport.Line2d
    Dim objRefAxis As SolidEdgePart.RefAxis
    Dim objCrossSection As SolidEdgeFrameworkSupport.Circle2d
    Dim objCSArray(1 To 2) As SolidEdgePart.Profile
    Dim objHelixCutout As SolidEdgePart.HelixCutout
    Dim objECProfile As SolidEdgePart.Profile
    Dim objExtCutout As SolidEdgePart.ExtrudedCutout
    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 base feature
    ' creating a circular profile and validating it
    Set objBaseProfile = objDoc.ProfileSets.Add.Profiles.Add(pRefPlaneDisp:=objDoc.RefPlanes(1))
    Call objBaseProfile.Circles2d.AddByCenterRadius(x:=0, y:=0, Radius:=0.05)
    lngStatus = objBaseProfile.End(ValidationCriteria:=igProfileClosed)
    If (lngStatus <> 0) Then
        MsgBox "Profile for the Base feature is not closed"
        Exit Sub
    End If
    Set objBaseProfileArray(1) = objBaseProfile
    ' creating the base feature
    Set objBaseModel = objDoc.Models.AddFiniteExtrudedProtrusion(NumberOfProfiles:=1, _
                                                                 ProfileArray:=objBaseProfileArray, ProfilePlaneSide:=igSymmetric, ExtrusionDistance:=0.1)
    objBaseProfile.Visible = False
    ' *** creating an extruded cutout feature
    ' creating a circular profile for the extruded cutout feature and validating it
    Set objECProfile = objDoc.ProfileSets.Add.Profiles.Add(pRefPlaneDisp:=objDoc.RefPlanes(1))
    Call objECProfile.Circles2d.AddByCenterRadius(x:=0, y:=0, Radius:=0.005)
    lngStatus = objECProfile.End(ValidationCriteria:=igProfileClosed)
    If (lngStatus <> 0) Then
        MsgBox "Profile for the extruded cutout feature is not closed"
        Exit Sub
    End If
    ' creating the extruded cutout feature and validating it
    Set objExtCutout = objDoc.Models(1).ExtrudedCutouts.AddFinite(Profile:=objECProfile, ProfileSide:=igLeft, _
                                                                  ProfilePlaneSide:=igSymmetric, Depth:=0.1)
    objECProfile.Visible = False
    If (objExtCutout.Status <> igFeatureOK) Then
        MsgBox "AddFinite method of the ExtrudedCutouts object fails"
    End If
    ' *** creating a helix cutout feature
    ' creating a circular profile and a reference axis and validating it
    Set objProfile = objDoc.ProfileSets.Add.Profiles.Add(pRefPlaneDisp:=objDoc.RefPlanes(2))
    Set objLine = objProfile.Lines2d.AddBy2Points(x1:=0, y1:=0.05, x2:=0, y2:=-0.05)
    Set objRefAxis = objProfile.SetAxisOfRevolution(LineForAxis:=objLine)
    Set objCrossSection = objProfile.Circles2d.AddByCenterRadius(x:=0.025, y:=-0.05, Radius:=0.01)
    lngStatus = objProfile.End(ValidationCriteria:=igProfileClosed)
    If (lngStatus <> 0) Then
        MsgBox "Profile for the helix cutout feature is not closed"
        Exit Sub
    End If
    Set objCSArray(1) = objProfile
    ' creating the helix cutout feature and validating it
    Set objHelixCutout = objDoc.Models(1).HelixCutouts.AddFinite(HelixAxis:=objRefAxis, _
                                                                 AxisStart:=igEnd, NumCrossSections:=1, CrossSectionArray:=objCSArray, _
                                                                 ProfileSide:=igRight, Height:=0.1, Pitch:=0.025, NumberOfTurns:=4, HelixDir:=igRight)
    objProfile.Visible = False
    If (objHelixCutout.Status <> igFeatureOK) Then
        MsgBox "AddFinite method of the HelixCutouts object fails"
    End If
    ' reordering the helix cutout feature and the extruded cutout features
    Call objHelixCutout.Reorder(TargetFeature:=objBaseModel.ExtrudedProtrusions(1), _
                                InsertBefore:=False)
    ' USER DISPLAY
    ' Release objects
    Set objApp = Nothing
    Set objDoc = Nothing
    Set objBaseProfile = Nothing
    Set objBaseProfileArray(1) = Nothing
    Set objBaseModel = Nothing
    Set objProfile = Nothing
    Set objLine = Nothing
    Set objRefAxis = Nothing
    Set objCrossSection = Nothing
    Set objCSArray(1) = Nothing
    Set objHelixCutout = Nothing
    Set objECProfile = Nothing
    Set objExtCutout = Nothing
End Sub
See Also

HelixCutout Object  | HelixCutout Members