Message 1 of 3
Exception: eInvalidInput Surface.CreateFrom(pl3d)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Point3d pt_left_down = new Point3d(432536.587782616, 2687388.25631493, 878.298840506535);
Point3d pt_right_down = new Point3d(432550.741108191, 2687388.25631493, 870.545233657537);
Point3d pt_left_up = new Point3d(432537.786447037, 2687391.85152945, 880.486865788067);
Vector3d vec = pt_right_down - pt_left_down;
Point3d pt_right_up = pt_left_up + vec;
Point3dCollection pt3ds = new Point3dCollection();
pt3ds.Add(pt_left_down);
pt3ds.Add(pt_left_up);
pt3ds.Add(pt_right_up);
pt3ds.Add(pt_right_down);
Polyline3d pl3d = new Polyline3d(Poly3dType.SimplePoly, pt3ds, true);
//Error
//Autodesk.AutoCAD.Runtime.Exception: eInvalidInput
//Autodesk.AutoCAD.DatabaseServices.Surface.CreateFrom(Entity fromEntity)
Autodesk.AutoCAD.DatabaseServices.Surface surface = Autodesk.AutoCAD.DatabaseServices.Surface.CreateFrom(pl3d);
Document doc = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;
doc.AddToModelSpace(surface);