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 objModel As SolidEdgePart.Model
    Dim objProfArr(1 To 2) As SolidEdgePart.Profile
    Dim objLines As SolidEdgeFrameworkSupport.Lines2d
    Dim objRelns1 As SolidEdgeFrameworkSupport.Relations2d
    Dim objRelns2 As SolidEdgeFrameworkSupport.Relations2d
    Dim objRefPln1 As SolidEdgePart.RefPlane
    Dim objRefPln2 As SolidEdgePart.RefPlane
    Dim objCutProf As SolidEdgePart.Profile
    Dim objCutLines As SolidEdgeFrameworkSupport.Lines2d
    Dim objExtCut As SolidEdgePart.ExtrudedCutout
    Dim objRib1 As SolidEdgePart.Rib
    Dim objEdgs As Object
    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
    '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.04, y2:=0)
    Call objLines.AddBy2Points(x1:=0.04, y1:=0, x2:=0.04, y2:=0.04)
    Call objLines.AddBy2Points(x1:=0.04, y1:=0.04, x2:=0, y2:=0.04)
    Call objLines.AddBy2Points(x1:=0, y1:=0.04, 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(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.04)
    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 a Cutout object Profile
    Set objRefPln1 = objDoc.RefPlanes.AddParallelByDistance(ParentPlane:=objDoc.RefPlanes(3), Distance:=0, NormalSide:=igRight)
    Set objCutProf = objDoc.ProfileSets.Add.Profiles.Add(pRefPlaneDisp:=objRefPln1)
    Set objCutLines = objCutProf.Lines2d
    Call objCutLines.AddBy2Points(x1:=0.01, y1:=0.01, x2:=0.03, y2:=0.01)
    Call objCutLines.AddBy2Points(x1:=0.03, y1:=0.01, x2:=0.03, y2:=0.03)
    Call objCutLines.AddBy2Points(x1:=0.03, y1:=0.03, x2:=0.01, y2:=0.03)
    Call objCutLines.AddBy2Points(x1:=0.01, y1:=0.03, x2:=0.01, y2:=0.01)
    ' Relate the Lines to make the Profile closed
    Set objRelns2 = objCutProf.Relations2d
    Call objRelns2.AddKeypoint(Object1:=objCutLines(1), Index1:=igLineEnd, Object2:=objCutLines(2), Index2:=igLineStart)
    Call objRelns2.AddKeypoint(Object1:=objCutLines(2), Index1:=igLineEnd, Object2:=objCutLines(3), Index2:=igLineStart)
    Call objRelns2.AddKeypoint(Object1:=objCutLines(3), Index1:=igLineEnd, Object2:=objCutLines(4), Index2:=igLineStart)
    Call objRelns2.AddKeypoint(Object1:=objCutLines(4), Index1:=igLineEnd, Object2:=objCutLines(1), Index2:=igLineStart)
    ' Check for the Profile Validity
    lngStatus = objCutProf.End(igProfileClosed)
    If lngStatus <> 0 Then
        MsgBox ("Profile not closed")
    End If
    ' Create a Cutout object
    Set objExtCut = objModel.ExtrudedCutouts.AddFinite(Profile:=objCutProf, ProfileSide:=igLeft, ProfilePlaneSide:=igLeft, Depth:=0.02)
    objCutProf.Visible = False
    ' Check the status of CutOut Feature
    If objModel.ExtrudedCutouts(1).Status <> igFeatureOK Then
        MsgBox ("Error in the Creation of Cutout Feature object")
    End If
    ' Create a Line object Profile for the Rib Feature
    Set objRefPln2 = objDoc.RefPlanes.AddParallelByDistance(ParentPlane:=objDoc.RefPlanes(3), Distance:=0.01, NormalSide:=igLeft)
    Set objProfArr(2) = objDoc.ProfileSets.Add.Profiles.Add(pRefPlaneDisp:=objRefPln2)
    Call objProfArr(2).Lines2d.AddBy2Points(x1:=0.02, y1:=0.02, x2:=0.025, y2:=0.025)
    ' Create a Rib object
    Set objRib1 = objModel.Ribs.Add(RibProfile:=objProfArr(2), ProfileExtensionType:=igExtend, _
                                    ThicknessType:=igThkNormalToProfilePlane, _
                                    MaterialSide:=igRight, ThicknessSide:=igRight, _
                                    Thickness:=0.002)
    objProfArr(2).Visible = False
    ' Check the status of Rib Feature
    If objModel.Ribs(1).Status <> igFeatureOK Then
        MsgBox ("Fails with options:- ProfileExtensionType:= igExtend, ThicknessType:=igThkNormalToProfilePlane, MaterialSide:=igRight, ThicknessSide:=igRight")
    End If
    ' Get the Edges of Rib object
    Set objEdgs = objRib1.Edges(EdgeType:=igQueryAll)
    ' USER DISPLAY
    ' Release objects
    Set objApp = Nothing
    Set objDoc = Nothing
    Set objProfArr(1) = Nothing
    Set objProfArr(2) = Nothing
    Set objModel = Nothing
    Set objLines = Nothing
    Set objRelns1 = Nothing
    Set objRelns2 = Nothing
    Set objRefPln1 = Nothing
    Set objRefPln2 = Nothing
    Set objCutProf = Nothing
    Set objCutLines = Nothing
    Set objExtCut = Nothing
    Set objRib1 = Nothing
    Set objEdgs = Nothing
End Sub
See Also

Rib Object  | Rib Members

Send comments on this topic.