예제 #1
0
        public void Run(Document doc)
        {
            Setting   = SettingManagerSection.Instance.GetSetting();
            ViewModel = new ManagerSectionModel(doc, Setting);
            var form = new FrmManagerSection(this, doc);

            this._exEvent = ExternalEvent.Create((IExternalEventHandler) new ManagerSectionEvent(this, doc));
            form.Show();
            form.ExEvent = this._exEvent;
        }
예제 #2
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;
            sel     = uidoc.Selection;
            Setting = SettingManagerSection.Instance.GetSetting();
            if (Setting.FamilySymbol == null && Setting.Parameter == null)
            {
                var form = new FrmSettingManagerSection(this, doc);
                form.ShowDialog();
            }
            ViewModel = new ManagerSectionModel(doc, Setting);
            Run(doc);
            return(Result.Succeeded);
        }