Solid Edge Part Type Library
IncludeEdge Method
Specifies the Edge or geometry2d object resulting from the ProjectSilhouetteEdge method whose projection will be included in the profile.
Returns the newly added geometry2d object. If not specified, the object is still generated and added to the appropriate collection on the Profile, but no reference to the object is returned.
Description
Adds a 2D geometry object (for example, Line2d, Arc2d, Circle2d, and so forth) resulting from the inclusion to the corresponding collection on the Profile.
Syntax
Visual Basic
Public Sub IncludeEdge( _
   ByVal Edge As Object, _
   Optional ByRef Geometry2d As Variant _
) 
Parameters
Edge
Specifies the Edge or geometry2d object resulting from the ProjectSilhouetteEdge method whose projection will be included in the profile.
Geometry2d
Returns the newly added geometry2d object. If not specified, the object is still generated and added to the appropriate collection on the Profile, but no reference to the object is returned.
Remarks
This method also optionally returns a reference to the newly added object.
Example
Private Sub Form_Load()
    Dim objApp As SolidEdgeFrameWork.Application
    Dim objDoc As SolidEdgePart.PartDocument
    Dim objProfile As SolidEdgePart.Profile
    Dim objProfileset As SolidEdgePart.ProfileSet
    Dim objEdges As Object
    Dim objEdge As Object
    Dim objGeom2d As Object
    Dim objPrjGeom2d As Object
    Dim objProfile1 As SolidEdgePart.Profile
    Dim objFaces As Object
    Dim objFace As Object
    Dim objPrjSilGeom2d() As Object
    Dim objSilGeom2d As Object
    Dim objExtrudedProtrusion As SolidEdgePart.ExtrudedProtrusion
    Dim objLine1 As SolidEdgeFrameworkSupport.Line2d
    Dim objLine2 As SolidEdgeFrameworkSupport.Line2d
    Dim objProfileset1 As SolidEdgePart.ProfileSet
    ' Local variables to be declared here
    Const TESTFILE = "T:\vbtests\testcases\Cylinder.par"
    Dim lngCount2d As Long
    Dim ii As Integer
    ' 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
    'Close the existing Document
    Call objDoc.Close(Savechanges:=False)
    'Open the test case
    Set objDoc = objApp.Documents.Open(Filename:=TESTFILE)
    'Get the Edges collection of the ExtrudedProtrusion1
    Set objEdges = objDoc.Models(1).ExtrudedProtrusions(1).Edges(igQueryAll)
    'Get the circular edge
    Set objEdge = objEdges(1)
    'Get the ProfileSet
    Set objProfileset = objDoc.ProfileSets.Add
    'Add a Profile
    Set objProfile = objProfileset.Profiles.Add(objDoc.RefPlanes(1))
    'Project the Circular Edge onto the Profile to get the 2d Geometry object
    Set objPrjGeom2d = objProfile.ProjectEdge(objEdge)
    Call objProfile.IncludeEdge(objPrjGeom2d, objGeom2d)
    Call objDoc.Models(1).ExtrudedProtrusions.AddFinite(objProfile, igLeft, igLeft, 0.025)
    objProfile.Visible = False
    'IncludeEdge also accepts SilhoutteEdges as shown below
    'Get the Faces collection of the ExtrudedProtrusion2
    Set objFaces = objDoc.Models(1).ExtrudedProtrusions(2).Faces(igQueryAll)
    'Get the Cylindrical Face
    Set objFace = objFaces(1)
    'Get the ProfileSet
    Set objProfileset1 = objDoc.ProfileSets.Add
    ' Add a new Profile
    Set objProfile1 = objProfileset1.Profiles.Add(objDoc.RefPlanes(3))
    'Project the Face to get silhoutte edges
    Call objProfile1.ProjectSilhoutteEdges(objFace, lngCount2d, objPrjSilGeom2d)

    Call objProfile1.IncludeEdge(objPrjSilGeom2d(1), objSilGeom2d)
    Set objLine1 = objProfile1.Lines2d.AddBy2Points(0, -0.025, 0.05, 0.05)
    Set objLine2 = objProfile1.Lines2d.AddBy2Points(0.05, 0.05, 0, 0.1)
    Call objProfile1.Relations2d.AddKeypoint(objLine1, igLineEnd, objLine2, igLineStart)
    Call objProfile1.Relations2d.AddKeypoint(objLine2, igLineEnd, objSilGeom2d, igLineStart)
    Call objProfile1.Relations2d.AddKeypoint(objSilGeom2d, igLineEnd, objLine1, igLineStart)
    ii = objProfile1.End(igProfileClosed)
    Set objExtrudedProtrusion = objDoc.Models(1).ExtrudedProtrusions.AddFinite(objProfile1, igRight, igRight, 0.2)
    objProfile1.Visible = False
    ' Release objects
    Set objApp = Nothing
    Set objDoc = Nothing
    Set objProfileset = Nothing
    Set objProfile = Nothing
    Set objEdges = Nothing
    Set objEdge = Nothing
    Set objPrjGeom2d = Nothing
    Set objGeom2d = Nothing
    Set objProfile1 = Nothing
    Set objSilGeom2d = Nothing
    Dim i As Integer
    For i = 0 To UBound(objPrjSilGeom2d)
        Set objPrjSilGeom2d(i) = Nothing
    Next
    Set objExtrudedProtrusion = Nothing
End Sub
See Also

Profile Object  | Profile Members