Distinguished Contributor
164 Posts
6 Kudos
Registered: ‎04-12-2005
Post 1 of 4


1619 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.

247 Posts
6 Kudos
Registered: ‎03-11-2008
Post 2 of 4

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
164 Posts
6 Kudos
Registered: ‎04-12-2005
Post 3 of 4

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

14 Posts
0 Kudos
Registered: ‎06-23-2008
Post 4 of 4

Re: IntersectWith

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

Thanks for posting this information it helped me out tremendously.




Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!