.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IntersectWith

3 REPLIES 3
Reply
Message 1 of 4
cadcamm99
3312 Views, 3 Replies

IntersectWith

Does IntersectWith work with 2011?  If not what is the fix?  Apparently I cannot find the apparent intersection point of two lines.

 

If I try to use IntersectWith, I get an error that it is obsolete.

3 REPLIES 3
Message 2 of 4
matus.brlit
in reply to: cadcamm99

it's not an error, it's just a warning, as far as i know

 

Public Sub IntersectWith(ByVal entityPointer As Autodesk.AutoCAD.DatabaseServices.Entity, ByVal intersectType As Autodesk.AutoCAD.DatabaseServices.Intersect, ByVal points As Autodesk.AutoCAD.Geometry.Point3dCollection, ByVal thisGraphicSystemMarker As System.IntPtr, ByVal otherGraphicSystemMarker As System.IntPtr)

 

if you use integers as the last 2 parameters, you get the obsolete warning, use System.IntPtr instead

Message 3 of 4
cadcamm99
in reply to: matus.brlit

Thanks this worked for me.

 

        'Setup 3d plane and point collection
        Dim myPlaneWCS As Plane = New Plane(New Point3d(0, 0, 0), New Vector3d(0, 0, 1))
        Dim myIntPntCol As Point3dCollection = New Point3dCollection()
        Dim myintptr01 As IntPtr = New IntPtr()
        Dim myintptr02 As IntPtr = New IntPtr()

 

        'Get intersecting point collection
        objFirstLine.IntersectWith(objSecondLine, Intersect.ExtendBoth, myPlaneWCS, myIntPntCol, myintptr01, myintptr02)

 

        Dim pntIntPnt As Point3d
        'Check if number of intersecting points is one
        If myIntPntCol.Count = 1 Then
            'Create a new point from intersecting point
            pntIntPnt = New Point3d(myIntPntCol(0).X, myIntPntCol(0).Y, 0)
        Else
            MsgBox("Intersecting error.", MsgBoxStyle.Critical, "")
            Exit Sub
        End If

Message 4 of 4
mjsmith
in reply to: cadcamm99

Thanks for posting this information it helped me out tremendously.

 

 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost