Ejemplo n.º 1
0
        public void csv_sum_excel()
        {
            try
            {
                _CONNECTION c = new _CONNECTION();

                SUM_command_v2 program = new SUM_command_v2(ref c, false);

                try
                {
                    program.run();
                    program.dump_csv();

                    c.ed.WriteMessage("\n[DONE]");
                }
                catch (DMTException de)
                {
                    c.ed.WriteMessage("\n" + de.Message);
                }
                catch (Exception ex)
                {
                    c.ed.WriteMessage("\n[ERROR] Unknown Exception");
                    c.ed.WriteMessage("\n[ERROR] " + ex.Message);
                    c.ed.WriteMessage("\n[ERROR] " + ex.TargetSite);
                }
                finally
                {
                    c.close();
                }
            }
            catch
            {
                _SWF.MessageBox.Show("\n[ERROR] Connection to BricsCad/AutoCad failed.");
            }
        }
Ejemplo n.º 2
0
        public void info()
        {
            try
            {
                _CONNECTION c = new _CONNECTION();

                try
                {
                    string version = String.Format("{0}", System.IO.File.GetLastWriteTime(System.Reflection.Assembly.GetExecutingAssembly().Location).ToShortDateString());
                    c.ed.WriteMessage("\nHillStatic programmi versioon: " + version + "\n");
                    c.ed.WriteMessage("\n[DONE]");
                }
                catch (DMTException de)
                {
                    c.ed.WriteMessage("\n" + de.Message);
                }
                catch (Exception ex)
                {
                    c.ed.WriteMessage("\n[ERROR] Unknown Exception");
                    c.ed.WriteMessage("\n[ERROR] " + ex.Message);
                    c.ed.WriteMessage("\n[ERROR] " + ex.TargetSite);
                }
                finally
                {
                    c.close();
                }
            }
            catch
            {
                _SWF.MessageBox.Show("\n[ERROR] Connection to BricsCad/AutoCad failed.");
            }
        }
Ejemplo n.º 3
0
        public void csv_sum_weights()
        {
            try
            {
                _CONNECTION c = new _CONNECTION();

                KONTROLL_command program = new KONTROLL_command(ref c);

                try
                {
                    program.run();

                    c.ed.WriteMessage("\n[DONE]");
                }
                catch (DMTException de)
                {
                    c.ed.WriteMessage("\n" + de.Message);
                }
                catch (Exception ex)
                {
                    c.ed.WriteMessage("\n[ERROR] Unknown Exception");
                    c.ed.WriteMessage("\n[ERROR] " + ex.Message);
                    c.ed.WriteMessage("\n[ERROR] " + ex.TargetSite);
                }
                finally
                {
                    c.close();
                }
            }
            catch
            {
                _SWF.MessageBox.Show("\n[ERROR] Connection to BricsCad/AutoCad failed.");
            }
        }
Ejemplo n.º 4
0
        public CORNER_command(ref _CONNECTION c)
        {
            _c = c;

            dims   = new Dictionary <_Db.Dimension, _Db.BlockTableRecord>();
            memory = new Dictionary <_Db.BlockTableRecord, List <_Ge.Point3d> >();
        }
Ejemplo n.º 5
0
        public TABLE_command_v1(ref _CONNECTION c)
        {
            _c = c;

            total_stats = new List <_Mark>();
            local_stats = new Dictionary <_Area_v1, List <_Mark> >();
        }
Ejemplo n.º 6
0
        public void arm_table_sum_selected()
        {
            try
            {
                _CONNECTION c = new _CONNECTION();

                TABLE_command_v2 program = new TABLE_command_v2(ref c);

                try
                {
                    program.run(false);
                    program.output_local();

                    c.ed.WriteMessage("\n[DONE]");
                }
                catch (DMTException de)
                {
                    c.ed.WriteMessage("\n" + de.Message);
                }
                catch (Exception ex)
                {
                    c.ed.WriteMessage("\n[ERROR] Unknown Exception");
                    c.ed.WriteMessage("\n[ERROR] " + ex.Message);
                    c.ed.WriteMessage("\n[ERROR] " + ex.TargetSite);
                }
                finally
                {
                    c.close();
                }
            }
            catch
            {
                _SWF.MessageBox.Show("\n[ERROR] Connection to BricsCad/AutoCad failed.");
            }
        }
Ejemplo n.º 7
0
        public SUM_command_v2(ref _CONNECTION c, bool open)
        {
            _c = c;

            local_stats = new List <element>();

            _open = open;
        }
Ejemplo n.º 8
0
        public PRINT_command_v2(ref _CONNECTION c)
        {
            _c = c;

            local_stats = new List <_Area_v2>();

            engine = _Pl.PlotFactory.CreatePublishEngine();

            layoutManager = _Db.LayoutManager.Current;
        }
Ejemplo n.º 9
0
        public DIM_command_v2(ref _CONNECTION c)
        {
            _c = c;

            success = false;
            ptStart = new _Ge.Point3d();
            ptEnd   = new _Ge.Point3d();
            ptPos   = new _Ge.Point3d();
            ptNext  = new _Ge.Point3d();

            rotation = 0.0;
        }
Ejemplo n.º 10
0
        public XML_Filter_command(ref _CONNECTION c)
        {
            _c = c;

            _Db.HostApplicationServices hs = _Db.HostApplicationServices.Current;
            string dwg_path = hs.FindFile(_c.doc.Name, _c.doc.Database, _Db.FindFileHint.Default);

            dwg_dir = Path.GetDirectoryName(dwg_path);
            if (!dwg_dir.EndsWith(@"\"))
            {
                dwg_dir = dwg_dir + @"\";
            }

            xml_full      = dwg_dir + name + ".xml";
            xml_lock_full = dwg_dir + name + ".LCK";
        }
Ejemplo n.º 11
0
        public WEIGHT_command_v2(ref _CONNECTION c)
        {
            _c = c;

            local_stats = new Dictionary <_Area_v2, int>();

            _Db.HostApplicationServices hs = _Db.HostApplicationServices.Current;
            string dwg_path = hs.FindFile(_c.doc.Name, _c.doc.Database, _Db.FindFileHint.Default);

            dwg_dir = Path.GetDirectoryName(dwg_path);
            if (!dwg_dir.EndsWith(@"\"))
            {
                dwg_dir = dwg_dir + @"\";
            }

            xml_full      = dwg_dir + name + ".xml";
            xml_lock_full = dwg_dir + name + ".LCK";
        }
Ejemplo n.º 12
0
        public void sort_XML()
        {
            try
            {
                _CONNECTION c = new _CONNECTION();

                bool             pre_locked = false;
                XML_Sort_command program    = new XML_Sort_command(ref c);

                try
                {
                    program.run();

                    c.ed.WriteMessage("\n[DONE]");
                }
                catch (DMTException de)
                {
                    c.ed.WriteMessage("\n" + de.Message);
                }
                catch (DMTLockedException de)
                {
                    pre_locked = true;
                    c.ed.WriteMessage("\n" + de.Message);
                }
                catch (Exception ex)
                {
                    c.ed.WriteMessage("\n[ERROR] Unknown Exception");
                    c.ed.WriteMessage("\n[ERROR] " + ex.Message);
                    c.ed.WriteMessage("\n[ERROR] " + ex.TargetSite);
                }
                finally
                {
                    program.unlock_after_crash(pre_locked);

                    c.close();
                }
            }
            catch
            {
                _SWF.MessageBox.Show("\n[ERROR] Connection to BricsCad/AutoCad failed.");
            }
        }
Ejemplo n.º 13
0
        public void arm_weights_selected_v1()
        {
            try
            {
                _CONNECTION c = new _CONNECTION();

                WEIGHT_command_v1 program = new WEIGHT_command_v1(ref c);

                try
                {
                    program.run(false);
                    program.output_local();

                    c.ed.WriteMessage("\n[DONE]");
                }
                catch (DMTException de)
                {
                    c.ed.WriteMessage("\n" + de.Message);
                }
                catch (Exception ex)
                {
                    c.ed.WriteMessage("\n[ERROR] Unknown Exception");
                    c.ed.WriteMessage("\n[ERROR] " + ex.Message);
                    c.ed.WriteMessage("\n[ERROR] " + ex.TargetSite);
                }
                finally
                {
                    program.unlock_after_crash();

                    c.close();
                }
            }
            catch
            {
                _SWF.MessageBox.Show("\n[ERROR] Connection to BricsCad/AutoCad failed.");
            }
        }
Ejemplo n.º 14
0
 public NOPRINT_command(ref _CONNECTION c)
 {
     _c = c;
 }
Ejemplo n.º 15
0
 public TXT_command(ref _CONNECTION c)
 {
     _c = c;
 }
Ejemplo n.º 16
0
        public OVERRIDE_command(ref _CONNECTION c)
        {
            _c = c;

            dims = new Dictionary <_Db.Dimension, _Db.BlockTableRecord>();
        }
Ejemplo n.º 17
0
 public KONTROLL_command(ref _CONNECTION c)
 {
     _c = c;
 }
Ejemplo n.º 18
0
 public SIZE_command(ref _CONNECTION c)
 {
     _c = c;
 }