Any .NET programmers here?

If so, maybe someone might be interested in using / helping on one of my projects.See http://www.theswamp.org/index.php?topic=21601.msg263507#msg263507You will have to be a member to download the modules.

Comments

  • Had some trouble posting to theswamp. I have a basic question regarding your post listing "strait" DRX as twice as fast. Maybe you could clear up the difference between the three interfaces for me? Interesting stuff you posted but being a newbie to .NET, it will take me some to absorb. BY the way, I put together a .NET program in VB to triangulate points, but have a problem using interactive selection of the points. If I use SelectAll to aquire the SS everything is OK. If I use ssget() nothing seems to be returned to the program for processing. Does this have to do with marshalling or what?Thanks a lot. Jerry

  • Hi, JerryThanks for trying this out, It seems that I do need to do a little work on SDSMethods.SSget. Anyway without seeing your code it’s hard to see where the problem is. I have written a couple of samples in C# showing the difference between using my SDS wrappers and the COM wrappers. I’ll post this over at the Swamp too so other can see. //com sample [CommandMethodAttribute("MySel1")] public static void MySel1() { try { AcadApplication app = (AcadApplication)DRXNET.OdAp.Application.ComApplication; if (app == null) DRXNET.SDS.SDSMethods.PrintF("\n" + "Doh"); AcadDocument Doc = app.ActiveDocument; AcadSelectionSet selection = Doc.SelectionSets.Add("test"); try { int[] var = new int[] { 0 }; object[] val = new object[] { "POINT" }; selection.SelectOnScreen(var, val); List entlist = new List(); Point3dCollection ptlist = new Point3dCollection(); foreach (var e in selection) entlist.Add((AcadPoint)e); entlist.ForEach(e => ptlist.Add(new Point3d((double[])e.Coordinates))); ptlist.ForEach(p => DRXNET.SDS.SDSMethods.PrintF(p.ToString())); } catch { DRXNET.SDS.SDSMethods.PrintF("\nError Getting Selection set: "); } finally { selection.Delete(); } } catch (System.Exception ex) { DRXNET.SDS.SDSMethods.PrintF("\n" + ex.Message); DRXNET.SDS.SDSMethods.PrintF("\n" + ex.StackTrace); } } //sds sample [CommandMethodAttribute("MySel2")] public static void MySel2() { try { Point3dCollection ptlist = new Point3dCollection(); SDSResultBuffer filter = new SDSResultBuffer(); filter.Add(new TypedValue(0, "POINT")); SDSName ss = SDSMethods.SSGet(null, filter); if (ss.ID0 == 0 && ss.ID1 == 0) DRXNET.SDS.SDSMethods.PrintF("\nError Getting Selection set: "); for (int i = 0; i < SDSMethods.SSLength(ss); i++) { SDSName entname = SDSMethods.SSName(ss, i); SDSResultBuffer entlist = SDSMethods.EntGet(entname); foreach (TypedValue tv in entlist) { if (tv.TypeCode == 10) ptlist.Add(new Point3d((SDSPoint)tv.Value)); } } ptlist.ForEach(p => DRXNET.SDS.SDSMethods.PrintF(p.ToString())); SDSMethods.SSFree(ss); } catch (System.Exception ex) { DRXNET.SDS.SDSMethods.PrintF("\n" + ex.Message); DRXNET.SDS.SDSMethods.PrintF("\n" + ex.StackTrace); } }

This discussion has been closed.