Пример #1
0
        public List <MassFamilyInstance> GetInstancesByName(string familyName)
        {
            var massFInstanceList     = new List <MassFamilyInstance>();
            var foundedFamilyInstance = FamilyInstanceUtils.GetAllTheFamilyInstancesOfFamily(CommandData, familyName);

            foreach (var fInstance in foundedFamilyInstance)
            {
                var massFInstance = new MassFamilyInstance(fInstance);
                massFInstanceList.Add(massFInstance);
            }
            return(massFInstanceList);
        }
Пример #2
0
        public static List <MassFormModel> GetMassFormModels(ExternalCommandData commandData, string massFamilyName)
        {
            var massForms = FamilyInstanceUtils.GetAllTheFamilyInstancesOfFamily(commandData, massFamilyName);

            var massFormModels = new List <MassFormModel>();

            foreach (var massFormInstance in massForms)
            {
                var massFormModelItem = new MassFormModel
                {
                    Model = massFormInstance,
                    Faces = massFormInstance.GetFacesFromElement()
                };
                massFormModels.Add(massFormModelItem);
            }
            return(massFormModels);
        }