Hello everyone, I want to convert the typenames(name of the groups) to all the elements in the groups. For now i can select all the elements in a group and can get the typename as a string, but i cannot import it to all the elements. Does anyone know how to do this?
Basically what it boils down to is that you can’t enter into the Group Editor to make the change, and Revit won’t allow you to change things in groups outside the group editor unless they are text parameters that have been set to “Vary By Group Instance” or if there is only one instance of the Group placed in the project - then it is allowed to make changes outside of group editor. Groups are tricky business, but you have 2 options for working around some of their limitations.
You need to be writing to a project parameter that has been set to “Vary By Group Instance”. “Comments” is hard-coded to not vary by group instance. Create a new project parameter and this should work fine.
You can first write a script that renames multiple instances of your groups to unique names (leaving you with many unique named copies of the same group) - run the script to get the group name and write it to comments, then run a reverse script that grabs all of the duplicated groups and switches their type back to the original group.
I’d go with option 1…
Thanks for your help and information, i found an workaround that doesn’t make it necessary to copy this value to the component itself. but just reads this value from the group its contained in. Now i have almost all the information in my CSV which i export, i will make a new topic for my next question.