Message 1 of 6

Not applicable
03-24-2017
02:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
my code
[CommandMethod("testLineCross")] public void testLineCross() { Document doc = AcadApp.DocumentManager.MdiActiveDocument; Editor ed = doc.Editor; Database db = doc.Database; PromptEntityResult per = ed.GetEntity("Line1"); using (Transaction tr = doc.TransactionManager.StartOpenCloseTransaction()) { Line l1 = tr.GetObject(per.ObjectId, OpenMode.ForRead) as Line; per = ed.GetEntity("Line2"); Line l2 = tr.GetObject(per.ObjectId, OpenMode.ForRead) as Line; Point3dCollection ptcol = new Point3dCollection(); l1.IntersectWith(l2, Intersect.ExtendBoth,ptcol, IntPtr.Zero, IntPtr.Zero); if (ptcol.Count > 0) ed.WriteMessage("Intersect"); else ed.WriteMessage("non-intersect"); tr.Commit(); } }
My dwg see the Attachemnts.
why get the intersectPoint?
Version:AutoCAD 2012
Solved! Go to Solution.