/// <summary>
        /// Create and Show new ElementEditorForm
        /// </summary>
        /// <param name="commandData"></param>
        public void CreateForm(ExternalCommandData commandData)
        {
            // create ExternalEventHandler for Edit parameters
            ParaEditEventHandler handler       = new ParaEditEventHandler();
            ExternalEvent        paraEditEvent = ExternalEvent.Create(handler);

            handler.ParaEditEvent = paraEditEvent;

            // create element editor form
            elementEditorForm = new ElementEditorForm(commandData, handler);

            handler.ElementEditorForm = elementEditorForm;

            elementEditorForm.Show();
        }
Exemple #2
0
        // create ElementEditor form
        public ElementEditorForm(
            ExternalCommandData commandData,
            ParaEditEventHandler handler)
        {
            InitializeComponent();

            // inialize the data
            this.commandData     = commandData;
            this.handler         = handler;
            categoriesElementIds = new List <ElementId>();

            // find and show all categories in current project
            List <Category> categories = GetAllCategories();

            foreach (Category category in categories)
            {
                eleListBox.Items.Add(category.Name);
            }

            InitializeUI();
        }