Exemple #1
0
        //--------------------------------------------------------------
        #endregion

        #region event handlers
        //--------------------------------------------------------------

        private void On_ElementSelected(object sender, MainWindow.ElementSelectedEventArgs e)
        {
            UIDocument uiDoc = commandData.Application.ActiveUIDocument;

            uiDoc.Selection.Elements.Clear();
            uiDoc.Selection.Elements.Add(e.SelectedElement);
            uiDoc.RefreshActiveView();
        }
Exemple #2
0
        //--------------------------------------------------------------
        #endregion

        #region event handlers
        //--------------------------------------------------------------

        private void On_ElementSelected(object sender, MainWindow.ElementSelectedEventArgs e)
        {
            UIDocument uiDoc = commandData.Application.ActiveUIDocument;

            uiDoc.Selection.GetElementIds().Clear();
            List <ElementId> elIds = new List <ElementId>();

            elIds.Add(e.SelectedElement.Id);
            uiDoc.Selection.SetElementIds(elIds);

            uiDoc.RefreshActiveView();
        }