Exemplo n.º 1
0
        static public List <ObjectId> EntsInsideWindow(AcadGeo.Point3d low_pnt, AcadGeo.Point3d hi_pnt)
        {
            using (AcadApp.Application.DocumentManager.MdiActiveDocument.LockDocument())
            {
                using (Transaction tr = AcadFuncs.GetActiveDoc().TransactionManager.StartTransaction())
                {
                    PromptSelectionResult prmpt_ret = AcadFuncs.GetEditor().SelectCrossingWindow(low_pnt, hi_pnt);
                    if (PromptStatus.Cancel == prmpt_ret.Status)
                    {
                        tr.Abort();
                        tr.Dispose();
                        return(new List <ObjectId>());
                    }

                    tr.Commit();
                    if (null != prmpt_ret.Value)
                    {
                        return(prmpt_ret.Value.GetObjectIds().ToList());
                    }
                    else
                    {
                        return(new List <ObjectId>());
                    }
                }
            }
        }
Exemplo n.º 2
0
 public TextJig(DBText entity) : base(entity)
 {
     position = new Point3d(0.0, 0.0, 0.0);
     p1       = new Point3d(0.0, 0.0, 0.0);
     p2       = new Point3d(0.0, 0.0, 0.0);
     AcadFuncs.GetEditor().Rollover += new RolloverEventHandler(RollOverHandler);
 }
Exemplo n.º 3
0
 public void CreateLayout()
 {
     try
     {
         DBText text = new DBText();
         text.TextString = "abc";
         TextJig jig = new TextJig(text);
         if (PromptStatus.OK == AcadFuncs.GetEditor().Drag(jig).Status)
         {
             AcadFuncs.AddNewEnt(text);
         }
     }
     catch
     {
         return;
     }
 }
Exemplo n.º 4
0
 public void Dispose()
 {
     AcadFuncs.GetEditor().Rollover -= new RolloverEventHandler(RollOverHandler);
 }