<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Issues with IntersectWith AutoCAD 2010 in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/issues-with-intersectwith-autocad-2010/m-p/3863027#M50040</link>
    <description>&lt;P&gt;This lame discussion host doesn't allow code source files to be attached to posts, so you can find it here:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="http://www.theswamp.org/index.php?topic=44392.0"&gt;http://www.theswamp.org/index.php?topic=44392.0&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 12 Apr 2013 15:14:11 GMT</pubDate>
    <dc:creator>DiningPhilosopher</dc:creator>
    <dc:date>2013-04-12T15:14:11Z</dc:date>
    <item>
      <title>Issues with IntersectWith AutoCAD 2010</title>
      <link>https://forums.autodesk.com/t5/net-forum/issues-with-intersectwith-autocad-2010/m-p/3857232#M50037</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm developing for AutoCAD 2010 using VS 2010 (compilation platform 3.5), and running ObjectARX 2012.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So far, everything has worked for me, up till now. I ran into this intersectWith problem last week while attempting to fillet lines.&lt;/P&gt;&lt;P&gt;I was able to find some viable solutions online for filleting lines, but the problem is, when I compile and execute AutoCAD, I get the System.MissingMethodException: Method not found Autodesk.AutoCAD.DatabaseServices.Entity.IntersectWith error message.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have done some extensive searching on this forum, and the closest I came to a solution for intersectwith was a previous post titled "&lt;SPAN style="line-height: normal; font-size: medium;"&gt;IntersectWith problem&lt;/SPAN&gt;&lt;SPAN style="line-height: 14px;"&gt;" posted by dynamicscope, where Tony Tanzillo offers a solution for AutoCAD 2010 as a workaround. but when I click on the link&amp;nbsp;&lt;/SPAN&gt;&lt;A href="http://www.caddzone.com/PlatformUtils.vb" target="_blank"&gt;http://www.caddzone.com/PlatformUtils.vb&lt;/A&gt; there is nothing to download.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This IntersectWIth problem seems very difficult right now, so I am hoping that somewhere out there, someone has encountered similar situation, and found a viable solution.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;My big question is, are there any other alternatives for calculating the intersection point between 2 intersecting lines WITHOUT HAVING TO USE the intersectWith() method in AutoCAD 2010 VB.NET? Something that would still work for me even when my code is run in later versions of AutoCAD?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any help or pointers greatly appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks in advance!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2013 22:02:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/issues-with-intersectwith-autocad-2010/m-p/3857232#M50037</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-04-11T22:02:49Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with IntersectWith AutoCAD 2010</title>
      <link>https://forums.autodesk.com/t5/net-forum/issues-with-intersectwith-autocad-2010/m-p/3857401#M50038</link>
      <description>&lt;P&gt;Try this code this wil fillet polylines with radius of 50.0&lt;/P&gt;&lt;P&gt;change radius to your needs or define it using GetDistance&lt;/P&gt;&lt;P&gt;or GetDouble&lt;/P&gt;&lt;PRE&gt;       // use this function
        //[System.Security.SuppressUnmanagedCodeSecurity]
        //[DllImport("acad.exe", BestFitMapping = true, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Auto)]
        //private static extern int acedCmd(System.IntPtr vlist_in);
        // or this one instead
        //[System.Security.SuppressUnmanagedCodeSecurity]
        //[DllImport("acad.exe", EntryPoint = "acedCmd", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
        //extern static private int acedCmd(IntPtr resbuf);
        [CommandMethod("FILET")]// borrowed from fenton.webb
        public static void TestFillet()
        {
            Database db = HostApplicationServices.WorkingDatabase;

            Document doc = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;

            Editor ed = doc.Editor;

            Transaction tr = db.TransactionManager.StartTransaction();

            using (tr)
            {

                try
                {
                    // Prompt for the polyline to fillet

                    PromptEntityOptions peo = new PromptEntityOptions("\nSelect a polyline:");

                    peo.SetRejectMessage("\nSelect polyline only");

                    peo.AddAllowedClass(typeof(Polyline), true);

                    PromptEntityResult per = ed.GetEntity(peo);

                    if (per.Status != PromptStatus.OK)
                    {
                        return;
                    }

                    ObjectId fid = per.ObjectId;

                    DBObject obj1 = tr.GetObject(fid, OpenMode.ForWrite);

                    Autodesk.AutoCAD.ApplicationServices.Application.SetSystemVariable("CMDECHO", 0);

                    Autodesk.AutoCAD.ApplicationServices.Application.SetSystemVariable("FILLETRAD", 50.0);// Change fillet radius here

                    ResultBuffer buf = new ResultBuffer();

                    buf.Add(new TypedValue(5005, "_FILLET"));

                    buf.Add(new TypedValue(5005, "_P"));

                    buf.Add(new TypedValue(5006, fid));

                    acedCmd(buf.UnmanagedObject);

                    buf.Dispose();

                    Autodesk.AutoCAD.ApplicationServices.Application.SetSystemVariable("CMDECHO", 1);

                    tr.Commit();


                }
                catch (Autodesk.AutoCAD.Runtime.Exception ex)
                {
                    ed.WriteMessage(ex.Message + "\n" + ex.StackTrace);

                }

            }

        }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2013 06:09:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/issues-with-intersectwith-autocad-2010/m-p/3857401#M50038</guid>
      <dc:creator>Hallex</dc:creator>
      <dc:date>2013-04-12T06:09:28Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with IntersectWith AutoCAD 2010</title>
      <link>https://forums.autodesk.com/t5/net-forum/issues-with-intersectwith-autocad-2010/m-p/3857433#M50039</link>
      <description>&lt;P&gt;And this one is to fillet lines only&lt;/P&gt;&lt;PRE&gt;        // use this function
        //[System.Security.SuppressUnmanagedCodeSecurity]
        //[DllImport("acad.exe", BestFitMapping = true, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Auto)]
        //private static extern int acedCmd(System.IntPtr vlist_in);
        // or this one instead
        //[System.Security.SuppressUnmanagedCodeSecurity]
        //[DllImport("acad.exe", EntryPoint = "acedCmd", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
        //extern static private int acedCmd(IntPtr resbuf);
        [CommandMethod("FiLINE")]// borrowed from fenton.webb
        public static void TestFillet()
        {
            Database db = HostApplicationServices.WorkingDatabase;

            Document doc = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;

            Editor ed = doc.Editor;

            Transaction tr = db.TransactionManager.StartTransaction();

            using (tr)
            {

                try
                {
                    // Prompt for the polyline to fillet 2 objects

                    PromptEntityOptions peo = new PromptEntityOptions("\nSelect a first line:");

                    peo.SetRejectMessage("\nSelect line  only");

                    peo.AddAllowedClass(typeof(Line), true);

                    PromptEntityResult per = ed.GetEntity(peo);

                    if (per.Status != PromptStatus.OK)  return;

                    ObjectId fid = per.ObjectId;

                    peo.Message = "\nSelect second line:";

                    per = ed.GetEntity(peo);

                    if (per.Status != PromptStatus.OK)  return;

                    ObjectId snd = per.ObjectId;

                    DBObject obj1 = tr.GetObject(fid, OpenMode.ForWrite);

                    DBObject obj2 = tr.GetObject(snd, OpenMode.ForWrite);

                    Autodesk.AutoCAD.ApplicationServices.Application.SetSystemVariable("CMDECHO", 0);


                    Autodesk.AutoCAD.ApplicationServices.Application.SetSystemVariable("FILLETRAD", 50.0);// Change fillet radius here

                    ResultBuffer buf = new ResultBuffer();

                    buf.Add(new TypedValue(5005, "_FILLET"));

                   // buf.Add(new TypedValue(5005, "_P"));

                    buf.Add(new TypedValue(5006, fid));

                    buf.Add(new TypedValue(5006, snd));

                    acedCmd(buf.UnmanagedObject);

                    buf.Dispose();

                    Autodesk.AutoCAD.ApplicationServices.Application.SetSystemVariable("CMDECHO", 1);

                    tr.Commit();


                }
                catch (Autodesk.AutoCAD.Runtime.Exception ex)
                {
                    ed.WriteMessage(ex.Message + "\n" + ex.StackTrace);

                }

            }

        }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2013 06:41:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/issues-with-intersectwith-autocad-2010/m-p/3857433#M50039</guid>
      <dc:creator>Hallex</dc:creator>
      <dc:date>2013-04-12T06:41:56Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with IntersectWith AutoCAD 2010</title>
      <link>https://forums.autodesk.com/t5/net-forum/issues-with-intersectwith-autocad-2010/m-p/3863027#M50040</link>
      <description>&lt;P&gt;This lame discussion host doesn't allow code source files to be attached to posts, so you can find it here:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="http://www.theswamp.org/index.php?topic=44392.0"&gt;http://www.theswamp.org/index.php?topic=44392.0&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2013 15:14:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/issues-with-intersectwith-autocad-2010/m-p/3863027#M50040</guid>
      <dc:creator>DiningPhilosopher</dc:creator>
      <dc:date>2013-04-12T15:14:11Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with IntersectWith AutoCAD 2010</title>
      <link>https://forums.autodesk.com/t5/net-forum/issues-with-intersectwith-autocad-2010/m-p/3863198#M50041</link>
      <description>&lt;P&gt;When I've had this error message in the past, it's had to do with 64 bit versus 32 bit applications.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In particular, my application uses the IntersectWith command, and I have to convert the last two arguments to 64 bit integers.&amp;nbsp; Use 0L (Zero L) instead of Zero alone.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I.E:&lt;/P&gt;&lt;P&gt;Line1.IntersectWith(Line2, Intersect.OnBothOperands, ResultArray, 0L, 0L)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not sure if that's going to fix it, but it helped me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2013 16:46:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/issues-with-intersectwith-autocad-2010/m-p/3863198#M50041</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-04-12T16:46:39Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with IntersectWith AutoCAD 2010</title>
      <link>https://forums.autodesk.com/t5/net-forum/issues-with-intersectwith-autocad-2010/m-p/3863233#M50042</link>
      <description>&lt;P&gt;I am overwhelmed with gratitude at the quick and helpful responses I received on this intersectWIth problem; thanks all.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The solution posted by Hallex for filleting lines I have just stored away for future use, when I need to build a fillet functionality for SELECTING lines from user input.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, for now, the line objects I need to fillet are stored in memory as DBObjectCollection, and haven't quite been added to a database transaction yet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do this because I first construct the lines in memory, then I fillet them, and then I use their coordinates to generate a polyline, including the coordinates of the arc created during the filleting process.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am able to accomplish all of this successfully, ecpect that the filletLines function I am using utilizes the IntersectWIth function which just breaks everything. I paste the code I am using below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To solve this intersectWith problem, I am particularly interested in the PlatformUtils.vb class for the Autodesk.AutoCAD.DatabaseServices namespace by Tony Tanzillo (thanks to DiningPhilosopher for providing the link)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is the best way to implement this vb class so that its IntersectWIth method is the one called when I use the IntersectWIth method on a line?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do I just create the PlatformUtils.vb class in the same project as my other vb classes?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NB: Here is my filletLines code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;' Fillet functionality for this class; the lines must intersect with each other&lt;BR /&gt;Public Shared Sub filletLines(ByVal rad As Double, ByVal line1 As Line, _&lt;BR /&gt;ByVal line2 As Line)&lt;/P&gt;&lt;P&gt;Try&lt;BR /&gt;Dim intpts As New Point3dCollection()&lt;BR /&gt;' Get the intersection between lines&lt;BR /&gt;line1.IntersectWith(line2, Intersect.OnBothOperands, intpts, 0, 0)&lt;/P&gt;&lt;P&gt;' The lines must intersect with each other&lt;BR /&gt;If intpts.Count &amp;lt;&amp;gt; 1 Then Return&lt;BR /&gt;Dim ip As Point3d = intpts(0)&lt;BR /&gt;Dim midp1, midp2 As Point3d&lt;/P&gt;&lt;P&gt;' Compare points for line1, set the midpoint&lt;BR /&gt;If Not (line1.StartPoint.Equals(ip)) Then&lt;BR /&gt;line1.EndPoint = line1.StartPoint&lt;BR /&gt;line1.StartPoint = ip&lt;BR /&gt;End If&lt;BR /&gt;midp1 = line1.GetPointAtDist(rad)&lt;/P&gt;&lt;P&gt;' Compare points for line2, set the midpoint&lt;BR /&gt;If Not (line2.StartPoint.Equals(ip)) Then&lt;BR /&gt;line2.EndPoint = line2.StartPoint&lt;BR /&gt;line2.StartPoint = ip&lt;BR /&gt;End If&lt;BR /&gt;midp2 = line2.GetPointAtDist(rad)&lt;/P&gt;&lt;P&gt;' Get point on bisector&lt;BR /&gt;Dim midp As New Point3d((midp1.X + midp2.X) / 2.0, _&lt;BR /&gt;(midp1.Y + midp2.Y) / 2.0, (midp1.Z + midp2.Z) / 2.0)&lt;/P&gt;&lt;P&gt;' Get angles along lines from intersection&lt;BR /&gt;Dim ang1 As Double = angleFromX(ip, midp1)&lt;BR /&gt;Dim ang2 As Double = angleFromX(ip, midp2)&lt;/P&gt;&lt;P&gt;' Get bisector angle and then calculate angle between lines&lt;BR /&gt;Dim ang As Double = angleFromX(ip, midp)&lt;BR /&gt;Dim angc As Double = Math.Abs(ang2 - ang1)&lt;/P&gt;&lt;P&gt;' Get a half of them and then calculate hypotenuse&lt;BR /&gt;Dim bis As Double = angc / 2.0&lt;BR /&gt;Dim hyp As Double = rad / Math.Sin(bis)&lt;/P&gt;&lt;P&gt;' Calculate the center point of filleting arc&lt;BR /&gt;Dim cPoint As Point3d = polarPoint(ip, ang, hyp)&lt;/P&gt;&lt;P&gt;' Calculate another leg of a triangle&lt;BR /&gt;Dim dblCat As Double = Math.Sqrt((Math.Pow(hyp, 2)) - (Math.Pow(rad, 2)))&lt;/P&gt;&lt;P&gt;' Calculate start point of arc, end point of arc and define arc&lt;BR /&gt;Dim pStart As Point3d = polarPoint(ip, ang1, dblCat)&lt;BR /&gt;Dim pEnd As Point3d = polarPoint(ip, ang2, dblCat)&lt;BR /&gt;Dim arc As New Arc()&lt;/P&gt;&lt;P&gt;' Define the direction of the arc&lt;BR /&gt;If isLeft(midp2, ip, midp1) Then&lt;BR /&gt;arc = New Arc(cPoint, rad, angleFromX(cPoint, pEnd), _&lt;BR /&gt;angleFromX(cPoint, pStart))&lt;BR /&gt;Else : arc = New Arc(cPoint, rad, angleFromX(cPoint, pStart), _&lt;BR /&gt;angleFromX(cPoint, pEnd))&lt;BR /&gt;End If&lt;/P&gt;&lt;P&gt;' Trim lines by arc&lt;BR /&gt;line1.StartPoint = pStart&lt;BR /&gt;line2.StartPoint = pEnd&lt;/P&gt;&lt;P&gt;' Update the lines and arc properties for this class&lt;BR /&gt;m_line1 = line1&lt;BR /&gt;m_line2 = line2&lt;BR /&gt;m_arc = arc&lt;/P&gt;&lt;P&gt;Catch ex As Autodesk.AutoCAD.Runtime.Exception&lt;BR /&gt;acApp.ShowAlertDialog("Sorry, unable to fillet lines! " &amp;amp; ex.Message)&lt;BR /&gt;End Try&lt;/P&gt;&lt;P&gt;End Sub&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2013 17:19:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/issues-with-intersectwith-autocad-2010/m-p/3863233#M50042</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-04-12T17:19:53Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with IntersectWith AutoCAD 2010</title>
      <link>https://forums.autodesk.com/t5/net-forum/issues-with-intersectwith-autocad-2010/m-p/3870948#M50043</link>
      <description>It looks like there's a missing attribute on the module (I've updated the post on theswamp to include it).&lt;BR /&gt;&lt;BR /&gt;You need to add an &amp;lt;Extension()&amp;gt; attribute to the module, and with that, the methods should be callable as an extension methods of the Entity class.</description>
      <pubDate>Sat, 13 Apr 2013 12:32:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/issues-with-intersectwith-autocad-2010/m-p/3870948#M50043</guid>
      <dc:creator>DiningPhilosopher</dc:creator>
      <dc:date>2013-04-13T12:32:10Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with IntersectWith AutoCAD 2010</title>
      <link>https://forums.autodesk.com/t5/net-forum/issues-with-intersectwith-autocad-2010/m-p/3872260#M50044</link>
      <description>&lt;P&gt;Still not working. I wonder what I'm missing here. I added the PlatformCompatibilityExtensionMethods module&amp;nbsp;to my project as a module file called PlatformUtils.vb. I even put the &amp;lt;Extension()&amp;gt; tag at the top of the PlatformCompatibilityExtensionMethods module.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And then, at the beginning of the cat.vb class file where I'm using IntersectWith, I import PlatformCompatibilityExtensionMethods in order to make it available, and yet, when I compile and run AutoCAD 2010 Mechanical, I get the System.MissingMethodException error message, and it's still saying "Methodnot found: Void Autodesk.AutoCAD.DatabaseServices.Entity.IntersectWith"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't understand how, even after &amp;nbsp;bringing in the&amp;nbsp;PlatformCompatibilityExtensionMethods module, my calls to IntersectWIth still point to&amp;nbsp;&lt;SPAN&gt;DatabaseServices.Entity.IntersectWith, and I was assuming that the PlatformUtils.vb module's IntersectWith methods would override the DatabaseServices.Entity.IntersectWith methods?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This intersectWith issue is the only problem I am having with my project, and because of it, my filleting fails. With my failing fillet, everything else fails as well. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;And, since I'm on AutoCAD 2010, replacing the last 2 parameters of IntersectWith with the 2012 variations (IntPtr.Zero, IntPtr.Zero) fails during compile, although it removes the warning message in VSStudio 2010. I tried converting my NET framework from 3.5 to 4.0, but everything just fell apart, so I had to revert back to framework 3.5.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can anybody please help me resolve this intersectWith problem? Is there any other way to find the intersection point of two crossing lines without using the IntersectWith method? My filleting function is perfect, because I use it to return the 2 filletted lines and the resulting arc, which allows me to build a polyline using their coordinates. But this all fails if IntersectWith remains problematic.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;At this point, I'm willing to try any mathematical variations which could help resolve this intersection point problem.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any suggestions?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Many thanks in advance...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Cat&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2013 19:21:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/issues-with-intersectwith-autocad-2010/m-p/3872260#M50044</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-04-15T19:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with IntersectWith AutoCAD 2010</title>
      <link>https://forums.autodesk.com/t5/net-forum/issues-with-intersectwith-autocad-2010/m-p/3872328#M50045</link>
      <description>&lt;P&gt;So here's what I've been able to accomplish so far:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was able to figure out how to use the PlatformUtils.vb IntersectWith extension method thus:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PlatformCompatibilityExtensionMethods.IntersectWith(line1, line2, Intersect.OnBothOperands, intpts, 0, 0)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used the line of code above to replace&amp;nbsp;line1.IntersectWith(line2, Intersect.OnBothOperands, intpts, 0, 0) in my filletLines() function&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And this solved the problem of System.MissingMethodException: Method not found, DatabaseServices.Entity.IntersectWith&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But now I am getting another error message saying "System.Reflection.TargetParameterCountException: Parameter count mismatch" And this error points to the PlatformUtils.vb class, on the IntersectWith method for which I paste below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;lt;Extension()&amp;gt; _&lt;BR /&gt;Public Function IntersectWith(ByVal entity As Entity, ByVal other As Entity, ByVal intersectType As Intersect, ByVal points As Point3dCollection) As Integer&lt;BR /&gt;Dim start As Integer = points.Count&lt;BR /&gt;Dim args As Object() = Nothing&lt;BR /&gt;If (IntPtr.Size &amp;gt; 4) Then&lt;BR /&gt;args = New Object() {other, intersectType, points, CLng(0), CLng(0)}&lt;BR /&gt;Else&lt;BR /&gt;args = New Object() {other, intersectType, points, CInt(0), CInt(0)}&lt;BR /&gt;End If&lt;BR /&gt;&lt;STRONG&gt;PlatformCompatibilityExtensionMethods.intersectWithMethod1.Invoke(entity, args)&lt;/STRONG&gt;&lt;BR /&gt;Return (points.Count - start)&lt;BR /&gt;End Function&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The line in bold is where the exception occurs. This IntersectWith method is from Tony Tanzillo'sworkaround for IntersectWith. Any ideas on how to resolve this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cat&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2013 20:44:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/issues-with-intersectwith-autocad-2010/m-p/3872328#M50045</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-04-15T20:44:05Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with Intersecting AutoCAD 2010</title>
      <link>https://forums.autodesk.com/t5/net-forum/issues-with-intersectwith-autocad-2010/m-p/3872677#M50046</link>
      <description>&lt;P&gt;I don't remember if AutoCAD 2010 is the release where the problem exists, and don't know if the product version you're using has it, or has been patched or something, but the arguments you're providing are the ones I would expect should work (the last two are longs on 64 bit or ints on 32 bit). Check the methods in the object browser and see if the last two arguments accept ints, longs, or System.IntPtr. If the last two arguments are both IntPtrs, then you don't need this fix and can just pass IntPtr.Zero for those arguments.&lt;BR /&gt;&lt;BR /&gt;Too bad whomever it was at Autodesk that was responsible for that major screw-up (creating two, platform-dependent, incompatible versions of the API) can't offer you some help, that is, assuming they haven't been fired. How it was possible for a screw-up of that magnitude to ever make it into the shipping product is&amp;nbsp;somewhere between&amp;nbsp;totally-incomprehensible and mind-boggling.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2013 09:26:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/issues-with-intersectwith-autocad-2010/m-p/3872677#M50046</guid>
      <dc:creator>DiningPhilosopher</dc:creator>
      <dc:date>2013-04-16T09:26:14Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with Intersecting AutoCAD 2010</title>
      <link>https://forums.autodesk.com/t5/net-forum/issues-with-intersectwith-autocad-2010/m-p/3873147#M50047</link>
      <description>&lt;P&gt;I checked the databaseServices IntersectWith in my object browser, and I see that the last 2 arguments are Long, so I guess this means the 64-bit patch is required.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And this also means I'm stuck with the platformUtils.vb fix... for now, at least. Any idea why this method&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PlatformCompatibilityExtensionMethods.intersectWithMethod1.Invoke(entity, args)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;gives me a&amp;nbsp;&lt;SPAN&gt;"System.Reflection.TargetParameterCountException: Parameter count mismatch" error? This is what I been trying to figure out, but it's kind of a trial and error thing for me, and nothing I've tried seems to work.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The error msg says that System.Reflection.RuntimeMethodInfo.Invoke() takes 5 arguments -&amp;gt; Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I'm at a crossroads on how to resolve this. It's been a long journey from filleting lines,only to end up patching up the IntersectWith method, and then getting stuck on the fix for IntersectWIth! But I feel I am almost at the journey's end.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any suggestions on this parameter count thing?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2013 16:10:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/issues-with-intersectwith-autocad-2010/m-p/3873147#M50047</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-04-16T16:10:16Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with Intersecting AutoCAD 2010</title>
      <link>https://forums.autodesk.com/t5/net-forum/issues-with-intersectwith-autocad-2010/m-p/3873236#M50048</link>
      <description>&lt;P&gt;The VB.NET code was converted using Reflector and it didn't do a very good job with it, and there's no compiler error when built the code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I updated the code on theswamp, and it should work, but you don't call those methods directly, you call the methods with the &amp;lt;Extension&amp;gt; attribute (as you originally tried), which you should be able to do via the Entity variable, or by prefixing their names with PlatformCompatiblityExtensionMethods.IntersectWith(....).&lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2013 17:28:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/issues-with-intersectwith-autocad-2010/m-p/3873236#M50048</guid>
      <dc:creator>DiningPhilosopher</dc:creator>
      <dc:date>2013-04-16T17:28:19Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with Intersecting AutoCAD 2010</title>
      <link>https://forums.autodesk.com/t5/net-forum/issues-with-intersectwith-autocad-2010/m-p/3873259#M50049</link>
      <description>&lt;P&gt;DiningPhiloshoper, you're the best out there!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Phew, finally this problem is resolved, your updated code took care of the parameter mismatch issue. All i had to do was replace this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;PlatformCompatibilityExtensionMethods.intersectWithMethod1.Invoke(&lt;/SPAN&gt;&lt;SPAN&gt;Nothing&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;(BindingFlags.NonPublic&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Or&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;BindingFlags.&lt;/SPAN&gt;&lt;SPAN&gt;Static&lt;/SPAN&gt;&lt;SPAN&gt;),&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Nothing&lt;/SPAN&gt;&lt;SPAN&gt;, args,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Nothing&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;with this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;PlatformCompatibilityExtensionMethods.intersectWithMethod1.Invoke(&lt;STRONG&gt;entity&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;(BindingFlags.NonPublic&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Or&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;BindingFlags.&lt;/SPAN&gt;&lt;SPAN&gt;Static&lt;/SPAN&gt;&lt;SPAN&gt;),&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Nothing&lt;/SPAN&gt;&lt;SPAN&gt;, args,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Nothing&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;and the whole thing worked like a charm!&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Thank you so much, DiningPhilosopher, my gratitude knows no limits for your patience, and all the help you accorded me in resolving this IntersectWith issue.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;God bless.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;Cat&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2013 17:48:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/issues-with-intersectwith-autocad-2010/m-p/3873259#M50049</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-04-16T17:48:41Z</dc:date>
    </item>
  </channel>
</rss>

