Unknown error in the function GetIntersectionShapesFromRegion

Dear all,

  Am new one to this forum and microstation VBA development. As mentioned in the above subject facing an unknown error while splitting the one shape element into two shapes, Where it is crossed by line element.

below attached code working fine with microstation v8i version but throwing unkown error in v8. Kindly help to fix the error in the below attached code and dgn file.

Public Function CreateRegion()
Dim ee As ElementEnumerator

Dim sh As Element
Dim lne As Element
Dim eles() As Element

'Intersection line element
Set lne = ActiveModelReference.GetElementByID(DLongFromLong(1822973))

'Shape element
Set sh = ActiveModelReference.GetElementByID(DLongFromLong(1822965))
ReDim Preserve eles(0)
Set eles(0) = lne
ReDim Preserve eles(1)
Set eles(1) = sh

Set ee = lne.AsShapeElement.GetIntersectionShapesFromRegion(eles, Nothing, msdFillModeNotFilled)

While ee.MoveNext
    Dim ele As Element
    Set ele = ee.Current
    ActiveModelReference.AddElement ele
Wend


End Function

1234.GetIntersectionFromRegion.dgn

Parents Reply Children
No Data