1 Reply Latest reply on Jun 4, 2014 1:02 PM by Ar K

    how can reach to vertexes of a parting Line

    Ar K

      Hello :-)

      how can get points of a parting line.

      i write this code in vb.net but dont work true. please help me :-)



      ' Preconditions:Part document with a selected parting line feature is open.  (parting line is in Mold Tools)    



      Dim swSelMgr As SelectionMgr

      swSelMgr = swDoc.SelectionManager


      Dim swFeat As Feature

      swFeat = swSelMgr.GetSelectedObject6(1, -1)


      Dim swPartingLine As PartingLineFeatureData

      swPartingLine = swFeat.GetDefinition


      Dim objVerArr As Object()

      objVerArr = swPartingLine.GetEntitiesToSplit(swSelectType_e.swSelVERTICES) '# error:objVerArr =nothing !!


      Dim vPoint As Object

      Dim X, Y, Z As Double

      For Each vrx As Vertex In objVerArr

            vPoint = vrx.GetPoint()

            X = vPoint(0)

            Y = vPoint(1)

            Z = vPoint(2)


        • Re: how can reach to vertexes of a parting Line
          Ar K

          Dim swSelectionMgr As SelectionMgr = swDoc.SelectionManager

          Dim PLFeat As Feature = swSelectionMgr.GetSelectedObject6(1, -1)

          Dim swPartingLine As PartingLineFeatureData = PLFeat.GetDefinition

          Dim edgVar() As Object= swPartingLine.PartingLines


          Dim edg(edgVar.Length - 1) As Edge

          For i As Integer = 0 To edg.Length - 1

               edg = edgVar



          'for example For one point:

          Dim x As Double = edg(0).IGetStartVertex.GetPoint(0)

          Dim y As Double = edg(0).IGetStartVertex.GetPoint(1)

          Dim z As Double = edg(0).IGetStartVertex.GetPoint(2)



          with Special thanks to   Artem Taturevych    :-)