Intersection

Hi Friends !

I´m trying to create a function that return Z when there are a intersection in my DGNApplication . . . How can I give Z code of my Element2? This is my code...

Thanks!

Private Sub ILocateCommandEvents_LocateFilter(ByVal Element As Element, point As Point3d, Accepted As Boolean)
   
    Dim ScanEnumerator  As ElementEnumerator
    Dim ScanCriteria    As New ElementScanCriteria
    Dim Element2      As Element
    Dim t               As Integer
    Dim points()        As Point3d
    
    Set ScanEnumerator = ActiveModelReference.Scan(ScanCriteria)
    Do While ScanEnumerator.MoveNext
    
        Set Element2 = ScanEnumerator.Current
        
        If Element.IsIntersectableElement Then
           
           points = Element.AsIntersectableElement.GetIntersectionPoints(Element2, Matrix3dIdentity)
           
        End If

        For t = 0 To UBound(points)
    
    If (UBound(points) = 0) Then
            Set oTextEle = CreateTextElement1(Nothing, points(t).Z, points(t), Matrix3dIdentity)
            ActiveModelReference.AddElement oTextEle
    End If
        Next
    Loop

End Sub

Parents Reply Children
No Data