Distinguished Contributor
Posts: 157
Registered: ‎04-12-2005
Message 1 of 4 (1,542 Views)


1542 Views, 3 Replies
03-08-2011 01:46 PM

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.

Posts: 246
Registered: ‎03-11-2008
Message 2 of 4 (1,511 Views)

Re: IntersectWith

03-09-2011 03:18 AM 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

Distinguished Contributor
Posts: 157
Registered: ‎04-12-2005
Message 3 of 4 (1,478 Views)

Re: IntersectWith

03-10-2011 07:28 AM 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)
            MsgBox("Intersecting error.", MsgBoxStyle.Critical, "")
            Exit Sub
        End If

Posts: 13
Registered: ‎06-23-2008
Message 4 of 4 (929 Views)

Re: IntersectWith

09-26-2012 07:27 AM in reply to: cadcamm99

Thanks for posting this information it helped me out tremendously.




Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.