Solid Edge Part Type Library
Edges Property
Description
Returns a collection of edges of a specified type that belong to a model, a feature, or a topology collection of faces.
Property type
Read-only property
Syntax
Visual Basic
Public Property Edges( _
   ByVal EdgeType As FeatureTopologyQueryTypeConstants _
) As Object
Parameters
EdgeType
ValueDescription
igQueryAllFeature Topology Query Type - All
igQueryConeFeature Topology Query Type - Cone
igQueryCylinderFeature Topology Query Type - Cylinder
igQueryEllipseFeature Topology Query Type - Ellipse
igQueryPlaneFeature Topology Query Type - Plane
igQueryRoundableFeature Topology Query Type - Roundable
igQuerySphereFeature Topology Query Type - Sphere
igQuerySplineFeature Topology Query Type - Spline
igQueryStraightFeature Topology Query Type - Straight
igQueryTorusFeature Topology Query Type - Torus
Remarks
The result of the Edges property is a topology collection. This topology collection is a temporary collection and is overwritten the next time the Edges, Faces, or FacesByRay property is used. By default, the Edges property returns all edges for the object. The topology collection can be restricted to a specified type of edge by supplying a value (from the FeatureTopologyQueryTypeConstants constant set) for the EdgeType argument for the feature objects only. For example, this property can be set to return all ellipse edges, straight edges, and so forth.
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 objDrftEdgs As Object
    Dim lngStatus As Long
    Dim dblAngArr(1 To 4) As Double
    Dim cDrftSide As FeaturePropertyConstants
    ' 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
    ' Get the Edges Property
    Set objDrftEdgs = objDft.Edges(EdgeType:=igQueryAll)
    ' 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
    Set objDrftEdgs = Nothing
End Sub
See Also

Draft Object  | Draft Members

Send comments on this topic.