Problem on Partial delete method using VBA.

Dear all,

            I am using Microstation v8i(Selected Series 3) with vba. I used Partial delete method for partial delete the line element. i done this but its not working properly. Here i paste my coding and attach my DGN.

Private Function SplitLine(pt As Point3d, fncele As Element)
Dim point As Point3d
Dim ele1 As Element
Dim ele2 As Element

Dim aPoints(0 To 2) As Point3d

aPoints(0) = pt
aPoints(1) = pt

point.X = 0#
point.Y = 0#
point.Z = 0#
    fncele.AsLineElement.PartialDelete ele1, ele2, aPoints(0), aPoints(1), point, 1
    
      If Not ele1 Is Nothing Then
            ActiveModelReference.AddElement ele1
            ele1.Rewrite
      End If

        If Not ele2 Is Nothing Then
            ActiveModelReference.AddElement ele2
            ele2.Rewrite
        End If

ActiveModelReference.RemoveElement fncele
End Function

PartialDelete.dgn

Parents Reply Children
No Data