Beispiel #1
0
 public Intersect_event(CheckIntersectcmd data, Document doc, Interference_Report form, FrmCheck frmCheck)
 {
     this._data     = data;
     this._frmCheck = frmCheck;
     _doc           = doc;
     this._form     = form;
 }
Beispiel #2
0
 public Interference_Report(CheckIntersectcmd data, a.Document doc, FrmCheck frmCheck)
 {
     _data     = data;
     _doc      = doc;
     _frmCheck = frmCheck;
     InitializeComponent();
     Removevaluecontains();
 }
Beispiel #3
0
        public Result Execute(
            ExternalCommandData commandData,
            ref string message,
            ElementSet elements)
        {
            UIApplication uiapp = commandData.Application;

            uidoc = uiapp.ActiveUIDocument;
            Application app = uiapp.Application;

            doc = uidoc.Document;
            Get_info v1   = new Get_info(doc, this);
            var      form = new FrmCheck(this, doc);

            if (form.ShowDialog() != System.Windows.Forms.DialogResult.OK)
            {
                if (form.r2 != null)
                {
                    Filterlist(doc, form.r2, ref list1, out Memberid);
                    var diclist = Filterelementbylist(doc, Memberid);
                    if (form.checkboxRebar)
                    {
                        if (diclist.Keys.ToList().Contains("REBAR"))
                        {
                            diclist["REBAR"].ToList().ForEach(x => ids.Add(x));
                        }
                    }
                    if (form.checkboxEmbed)
                    {
                        if (diclist.Keys.ToList().Contains("EMBED"))
                        {
                            diclist["EMBED"].ToList().ForEach(x => ids.Add(x));
                        }
                    }
                    if (form.checkboxStrand)
                    {
                        if (diclist.Keys.ToList().Contains("STRAND"))
                        {
                            diclist["STRAND"].ToList().ForEach(x => ids.Add(x));
                        }
                    }
                    if (form.checkboxLifting)
                    {
                        if (diclist.Keys.ToList().Contains("LIFTING"))
                        {
                            diclist["LIFTING"].ToList().ForEach(x => ids.Add(x));
                        }
                    }
                    if (form.checkboxEmbed)
                    {
                        Caculatetor(ids);
                    }
                    Showform(doc, ids, ref dic, form);
                }
            }
            return(Result.Succeeded);
        }
Beispiel #4
0
        public void Showform(Document doc, List <ElementId> elementIds, ref Dictionary <string, string> dic, FrmCheck frmCheck)
        {
            dic = Doing(doc, elementIds);
            var form2 = new Interference_Report(this, doc, frmCheck);

            this._exEvent = ExternalEvent.Create((IExternalEventHandler) new Intersect_event(this, doc, form2, frmCheck));
            form2.Show();
            form2.ExEvent = this._exEvent;
        }