Example #1
0
        handOverPoly3d(this ObjectId idPoly3dOrg, List <Point3d> pnts3d)
        {
            Polyline3d poly3dOrg = (Polyline3d)idPoly3dOrg.Open(OpenMode.ForRead);

            Point3dCollection pnts3dColl = new Point3dCollection();

            foreach (Point3d pnt3d in pnts3d)
            {
                pnts3dColl.Add(pnt3d);
            }

            Polyline3d poly3dNew = new Polyline3d(Poly3dType.SimplePoly, pnts3dColl, false);

            poly3dNew.SetDatabaseDefaults();
            poly3dOrg.UpgradeOpen();
            poly3dOrg.HandOverTo(poly3dNew, true, true);
            poly3dNew.Close();
            poly3dOrg.Dispose();
        }