for control PropertyGrid to show and modify parameters of column, beam or brace
        /// <summary>
        /// object factory to create FramingTypeParameters;
        /// will return null if necessary Parameters can't be found
        /// </summary>
        /// <param name="symbol"></param>
        /// <returns></returns>
        public static FrameTypeParameters CreateInstance(FamilySymbol symbol)
        {
            FrameTypeParameters result = new FrameTypeParameters(symbol);

            if (null == result.m_bDimension || null == result.m_hDimension)
            {
                return(null);
            }
            return(result);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// provide UI to edit is parameter
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void DuplicateTypeForm_Load(object sender, EventArgs e)
        {
            // initialize controls
            typeNameTextBox.Text = m_newSymbol.Name;
            familyTextBox.Text   = m_newSymbol.Family.Name;
            FrameTypeParameters symbolParas = FrameTypeParameters.CreateInstance(m_newSymbol);

            if (null != symbolParas)
            {
                typeParameterPropertyGrid.SelectedObject = symbolParas;
            }
            else
            {
                typeParameterPropertyGrid.Enabled = false;
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 /// object factory to create FramingTypeParameters; 
 /// will return null if necessary Parameters can't be found
 /// </summary>
 /// <param name="symbol"></param>
 /// <returns></returns>
 public static FrameTypeParameters CreateInstance(FamilySymbol symbol)
 {
     FrameTypeParameters result = new FrameTypeParameters(symbol);
     if (null == result.m_bDimension || null == result.m_hDimension)
     {
         return null;
     }
     return result;
 }