Esempio n. 1
0
        protected override int GetTotalChildrenCount()
        {
            if (m_Comp.GetSuppressionState() != swComponentSuppressionState_e.swComponentSuppressed)
            {
                var refModel = m_Comp.Component.GetModelDoc2();

                if (refModel is IAssemblyDoc)
                {
                    return((refModel as IAssemblyDoc).GetComponentCount(false));
                }
                else if (refModel == null)
                {
                    throw new Exception("Cannot retrieve the total count of chidren of the unloaded document");
                }
                else
                {
                    return(0);
                }
            }
            else
            {
                return(0);
            }
        }