public DIM_Settings()
 {
     tr = new AC_Transactions();
     Settings = new AC_Settings();
     Dimstyle = Settings.get_DimStyle(OpenMode.ForRead);
     Settings.Dispose();
 }
Beispiel #2
0
            public void Initialize()
            {
                tr = new AC_Transactions();
                DocColl = Application.DocumentManager;
                DocColl.DocumentCreated += DocColl_DocumentCreated;

                if (tr.AC_Doc != null){ findandLink(); }
            }
Beispiel #3
0
 public void HideTriangulate()
 {
     Triangulations triangulation = new Triangulations();
     AC_Transactions tr = new AC_Transactions();
     PromptEntityOptions options = new PromptEntityOptions("Pick a Line to Hide Triangulations");
     options.SetRejectMessage("not valid Object \n");
     options.AddAllowedClass(typeof(Line), true);
     PromptEntityResult sel = tr.AC_Doc.Editor.GetEntity(options);
     if (sel.Status == PromptStatus.OK)
     {
         triangulation.Hide((AC_Line)tr.openObjectErased(sel.ObjectId));
     }
 }
Beispiel #4
0
 public void BeginTriangulate()
 {
     buildTriangulations buildT = new buildTriangulations();
     AC_Transactions tr = new AC_Transactions();
     PromptEntityOptions options = new PromptEntityOptions("Pick a Line to Triangulate");
     options.SetRejectMessage("not valid Object \n");
     options.AddAllowedClass(typeof(Line), true);
     PromptEntityResult sel = tr.AC_Doc.Editor.GetEntity(options);
     if (sel.Status == PromptStatus.OK)
     {
         tr.AC_Doc.Editor.WriteMessage("Line " + sel.ObjectId.ToString() + " Selected \n");
         buildT.Create((AC_Line)tr.openObjectErased(sel.ObjectId));
     }
 }
Beispiel #5
0
        public void HideAllTriangulate()
        {
            Triangulations triangulation = new Triangulations();
            AC_Transactions tr = new AC_Transactions();
            Transaction trans = tr.start_Transaction();
            tr.openBlockTables(OpenMode.ForRead, OpenMode.ForRead);
            foreach (ObjectId id in tr.AC_blockTableRecord)
            {
                try{
                    AC_Entity ent = (AC_Entity)tr.openObjectErased(id);
                    if (ent.BaseEntity is Line)
                    {
                        AC_Line line = (AC_Line)ent;
                        ResultBuffer rb = line.XData;
                        if (rb != null)
                        {
                            //FIND XDATA GUID
                            int index = 0;
                            string guid = null;
                            foreach (TypedValue tv in rb)
                            {
                                if (index == 3)
                                {
                                    guid = tv.Value.ToString();
                                }
                                index++;
                            }

                            if (guid != null)
                            {
                                triangulation.Hide(line);
                            }
                        }
                    }
                    tr.Dispose(trans);
                }
                catch
                {
                    tr.AC_Doc.Editor.WriteMessage("Skipped a not Entity Object");
                }
            }
        }
Beispiel #6
0
 public AC_Settings()
 {
     tr = new AC_Transactions();
 }
Beispiel #7
0
 protected AC_MarshalByRefObject()
 {
     tr = new AC_Transactions();
 }
Beispiel #8
0
 public Triangulations()
 {
     //INIT ADD EVENTS
     tr = new AC_Transactions();
 }
Beispiel #9
0
            public buildTriangulations()
            {
                //INIT
                tr = new AC_Transactions();
                radius = new List<double>();

                //EVENT
                tr.AC_Doc.Editor.PointMonitor += Editor_PointMonitor;
            }
Beispiel #10
0
 public AC_Settings()
 {
     tr = new AC_Transactions();
 }
 protected AC_MarshalByRefObject()
 {
     tr = new AC_Transactions();
 }
Beispiel #12
0
 public DimInc_Preview(AC_Transactions AC_tr,DIM_Settings set)
 {
     tr = AC_tr;
     DIMset = set;
     acMath = new AC_Math();
     tr.AC_Doc.Editor.PointMonitor += Editor_PointMonitor;
 }
Beispiel #13
0
                public gripPointModified(ObjectId DimInc, ObjectId DimTexts)
                {
                    DimInc_pLine = DimInc;
                    DimInc_texts = DimTexts;
                    tr = new AC_Transactions();
                    DIMset = new DIM_Settings();
                    acMath = new AC_Math();

                    GripIndexs = new List<int?>();
                    GripIndexs.Add(null);
                    GripIndexs.Add(null);

                    calculateMidPoints();

                    ObjectId[] ids;
                    ids = new ObjectId[1] { DimInc_pLine };
                    SetIdFilter(ids);
                    tr.AC_Doc.Editor.PointMonitor += Editor_PointMonitor;
                    tr.AC_Doc.Editor.SelectionAdded += Editor_SelectionAdded;
                    tr.AC_Doc.Editor.SelectionRemoved += Editor_SelectionRemoved;
                    Application.DocumentManager.DocumentDestroyed += DocumentManager_DocumentDestroyed;
                }
Beispiel #14
0
 public DimInc_Modified()
 {
     tr = new AC_Transactions();
 }
Beispiel #15
0
 public DimInc_Create(bool softInit)
 {
     if (softInit)
     {
         //INIT TRANSACTION CLASS
         tr = new AC_Transactions();
         //INIT SETTINGS
         DIMset = new DIM_Settings();
         //INIT UTILITY_MATH
         acMath = new AC_Math();
     }
     else
     {
         //INIT TRANSACTION CLASS
         tr = new AC_Transactions();
         //INIT SETTINGS
         DIMset = new DIM_Settings();
         //INIT PREVIEW CLASS
         preview = new DimInc_Preview(tr, DIMset);
         //INIT MOD CLASS
         DimIncMod = new DimInc_Modified();
         //INIT UTILITY_MATH
         acMath = new AC_Math();
         //INIT POINTS AND TEXT ARRAY
         Points = new List<Point3d>();
         DIMtexts = new ObjectIdCollection();
         GUID = Guid.NewGuid().ToString();
     }
 }