# Load contents of yaml file into an ordered dict return yaml.dump_dict(configs_dict, parma_file) def get_parameters(): # get list of parameters to be exported from user fm = revit.doc.FamilyManager return forms.SelectFromList.show( [x.Definition.Name for x in fm.GetParameters()], title="Select Parameters", multiselect=True, ) or [] if __name__ == '__main__': forms.check_familydoc(exitscript=True) family_cfg_file = get_config_file() if family_cfg_file: family_params = get_parameters() if family_params: inctypes = incdefault = False # ask user to include family type definitions inctypes = forms.alert( "Do you want to export family types as well?", yes=True, no=True ) # if said no, ask if the current param values should be included if not inctypes: incdefault = forms.alert( "Do you want to include the current parameter values as "
"zP": BuiltInParameterGroup.INVALID, "SSGFID": BuiltInParameterGroup.PG_IDENTITY_DATA, "SSGTID": BuiltInParameterGroup.PG_IDENTITY_DATA, "SSG_Author": BuiltInParameterGroup.PG_IDENTITY_DATA, "SSG_Product Code": BuiltInParameterGroup.PG_IDENTITY_DATA, "SSG_Toll Free Number": BuiltInParameterGroup.PG_IDENTITY_DATA, "URL_Contact Southwest Solutions Group": BuiltInParameterGroup.PG_IDENTITY_DATA, "URL_Installation Manual": BuiltInParameterGroup.PG_IDENTITY_DATA, "URL_Product Page": BuiltInParameterGroup.PG_IDENTITY_DATA, "URL_Specification Manual": BuiltInParameterGroup.PG_IDENTITY_DATA, } logger = script.get_logger() # ensure active document is a family document forms.check_familydoc(revit.doc, exitscript=True) app = revit.doc.Application # make sure user has saved open models in case the tool crashes if not forms.alert( "Make sure your models are saved and synced. " "Hit OK to continue...", cancel=True ): script.exit() # get current shared parameter file sharedParametersFile = app.OpenSharedParameterFile() sharedGroups = sharedParametersFile.Groups # get current family parameters family_params = revit.doc.FamilyManager.GetParameters()