Solid Edge Part Type Library
AddBaseContourFlange Method
Specifies the profile to be used to create the Contour Flange.
Description
Creates a ContourFlange object.
Syntax
Visual Basic
Public Function AddBaseContourFlange( _
   ByVal pProfile As Object, _
   ByVal varThicknessSide As Variant, _
   ByVal varExtentType As Variant, _
   ByVal varProjectionSide As Variant, _
   ByVal varProjectionDistance As Variant, _
   ByVal varRadius As Variant, _
   Optional ByVal varNeutralFactor As Variant, _
   Optional ByVal varBnParamType As Variant, _
   Optional ByVal vtMitrePosition As Variant, _
   Optional ByVal vtMitreTypeAtStart As Variant, _
   Optional ByVal vtMitreTypeAtEnd As Variant, _
   Optional ByVal vtMitreSideAtStart As Variant, _
   Optional ByVal vtMitreSideAtEnd As Variant, _
   Optional ByVal vtMitreByDistOrAngleAtStart As Variant, _
   Optional ByVal vtMitreByDistOrAngleAtEnd As Variant, _
   Optional ByVal vtMitreDistOrAngleAtStart As Variant, _
   Optional ByVal vtMitreDistOrAngleAtEnd As Variant, _
   Optional ByVal vtMitreCutType As Variant _
) As Model
Parameters
pProfile
Specifies the profile to be used to create the Contour Flange.
varThicknessSide
varExtentType
varProjectionSide
varProjectionDistance
varRadius
varNeutralFactor
varBnParamType
vtMitrePosition
vtMitreTypeAtStart
vtMitreTypeAtEnd
vtMitreSideAtStart
vtMitreSideAtEnd
vtMitreByDistOrAngleAtStart
vtMitreByDistOrAngleAtEnd
vtMitreDistOrAngleAtStart
vtMitreDistOrAngleAtEnd
vtMitreCutType
Remarks
Typically, this method is used to create a contour flange that is to be the base feature for a model. Additional Contour Flanges added to the model are created through methods that belong to the model's ContourFlanges 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 objShDoc As SolidEdgePart.SheetMetalDocument
    Dim objProfile As SolidEdgePart.Profile
    Dim objLines As SolidEdgeFrameworkSupport.Lines2d
    Dim objRelns As SolidEdgeFrameworkSupport.Relations2d
    Dim objModel As SolidEdgePart.Model
    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
    Call objDoc.Close
    ' opening a sheet metal document
    Set objShDoc = objApp.Documents.Add(progID:="SolidEdge.SheetMetalDocument", TemplateDoc:="normal.psm")
    ' *** creating the Base ContourFlange using igRight and igSymmetric
    ' creating a profile for the base feature and validating it
    Set objProfile = objShDoc.ProfileSets.Add.Profiles.Add(pRefPlaneDisp:=objShDoc.RefPlanes(2))
    Set objLines = objProfile.Lines2d
    Call objLines.AddBy2Points(x1:=0, y1:=0.075, x2:=0.025, y2:=0.075)
    Call objLines.AddBy2Points(x1:=0.025, y1:=0.075, x2:=0.05, y2:=0.05)
    Call objLines.AddBy2Points(x1:=0.05, y1:=0.05, x2:=0.075, y2:=0.05)
    Call objLines.AddBy2Points(x1:=0.075, y1:=0.05, x2:=0.1, y2:=0.025)
    Set objRelns = objProfile.Relations2d
    Call objRelns.AddKeypoint(object1:=objLines(1), index1:=igLineEnd, object2:=objLines(2), index2:=igLineStart)
    Call objRelns.AddKeypoint(object1:=objLines(2), index1:=igLineEnd, object2:=objLines(3), index2:=igLineStart)
    Call objRelns.AddKeypoint(object1:=objLines(3), index1:=igLineEnd, object2:=objLines(4), index2:=igLineStart)
    lngStatus = objProfile.End(ValidationCriteria:=igProfileSingle Or igProfileNoSelfIntersect)
    If lngStatus <> 0 Then
        MsgBox "The profile for base feature is either self-intersecting or is not connected properly"
    End If
    ' creating the contour flange
    Set objModel = objShDoc.Models.AddBaseContourFlange(pProfile:=objProfile, varThicknessSide:=igRight, _
                                                        varExtentType:=igFinite, varProjectionSide:=igSymmetric, varProjectionDistance:=0.1, varRadius:=0.005)
    'Turn off the profile
    objProfile.Visible = False
    ' USER DISPLAY
    If (objModel.ContourFlanges(1).Status <> igFeatureOK) Then
        MsgBox "AddBaseContourFlange method of the Models object failed"
    End If
    ' Release objects
    Set objApp = Nothing
    Set objDoc = Nothing
    Set objShDoc = Nothing
    Set objProfile = Nothing
    Set objLines = Nothing
    Set objRelns = Nothing
    Set objModel = Nothing
End Sub
See Also

Models Collection  | Models Members