Ejemplo n.º 1
0
        public FamilyInfo(Document famDoc)
        {
            Family fam = famDoc.OwnerFamily;

            if (famDoc.Title.EndsWith(".rfa"))
            {
                Name = famDoc.Title.Substring(0, famDoc.Title.Length - 4);
            }
            else
            {
                Name = famDoc.Title;
            }

            BasicSettings = new BasicFamilySettings(fam);

            List_myFamParams = MyFamilyParameter.CollectFamilyParameters(famDoc);

            //List_FamilyChars = new List<FamilyCharacteristic>();

            List_RefPlanes = RefPlane.CollectRefPlanes(famDoc);
            //List_FamilyChars.Add(new FamilyCharacteristic("ReferencePlanes", List_RefPlanes));

            List_FamilyDimensions = FamilyDimension.CollectDimensions(famDoc);
            //List_FamilyChars.Add(new FamilyCharacteristic("Dimensions", familyDimensions));

            List_Curves = Geometry.GeometryCurve.CollectCurves(famDoc);
            //List_FamilyChars.Add(new FamilyCharacteristic("Dimensions", familyDimensions));

            List_Forms = Geometry.FamilyGeometryForm.CollectForms(famDoc);
            //List_FamilyChars.Add(new FamilyCharacteristic("Forms", forms));

            List_NestedFamilies = GetNestedFamilies(famDoc, false);
            //List_FamilyChars.Add(new FamilyCharacteristic("Forms", forms));
        }
        public static List <MyFamilyParameter> CollectFamilyParameters(Document famDoc)
        {
            List <MyFamilyParameter> myFamParams = new List <MyFamilyParameter>();

            foreach (FamilyParameter fp in famDoc.FamilyManager.Parameters)
            {
                MyFamilyParameter mfp = new MyFamilyParameter(fp);
                myFamParams.Add(mfp);
            }
            return(myFamParams);
        }