Inheritance: ISelectionFilter
Exemplo n.º 1
0
        /// <summary>
        ///   Gets the wall element.
        /// </summary>
        /// <exception cref="Exception">Selected Wall Element was found in Document</exception>
        private void GetWallElement()
        {
            clsWallFilter m_filter = new clsWallFilter();

            Reference m_ref = _UiDoc.Selection.PickObject(
                ObjectType.Element,
                m_filter,
                "Select the target Wall. [Wall]");

            WallElement = _Doc.GetElement(m_ref) as Wall;

            if (WallElement == null)
            {
                throw new Exception("Selected Wall Element was found in Document");
            }
        }
Exemplo n.º 2
0
        /// <summary>
        ///   Gets the wall element.
        /// </summary>
        /// <exception cref="Exception">Selected Wall Element was found in Document</exception>
        private void GetWallElement()
        {
            clsWallFilter m_filter = new clsWallFilter();

              Reference m_ref = _UiDoc.Selection.PickObject(
            ObjectType.Element,
            m_filter,
            "Select the target Wall. [Wall]");

              WallElement = _Doc.GetElement(m_ref) as Wall;

              if (WallElement == null)
              {
            throw new Exception("Selected Wall Element was found in Document");
              }
        }