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.
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
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, "")