/// <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); }
/// <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; } }
/// <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; }