Renaming Shared Parameters

Simple question… Can it be done??

1 Like

Best method is to create a new Shared Parameter with the changed name, copy the data from the old name to the new name, then remove the old Shared Parameter.

Thank you, but I was really hoping for something more efficient. I will hold out to see if anyone else has a way of doing it in Dynamo before I spend the time creating new ones and copying the data.

I don’t think so but the node SetSharedParameterByGUID should have been invented a long time ago.

2 Likes

Any given Revit project (RVT) uses the initial name stored with the GUID. Even if you renamed it manually in the TXT file, it would revert in your RVT file. While we can get the GUIDs from the Shared Parameters text file(s), it can’t be exposed in the API to manipulate attributes, such as the name. If that binding could be resolved, we could do a lot of things…

2 Likes

It would be a great addition in Revit. An idea has been put forward, but would need much more votes. https://forums.autodesk.com/t5/revit-ideas/rename-shared-parameter/idi-p/6334363

You would not need this if the parameter could be selected by it GUID, the name is there to make it human readable. If its called “John” or “Erin” is not the important bit, but could lead to serious errors.

OK, so I have created the new Shared Parameters with the correct names. Can I transfer a parameter to another in dynamo instead of opening each family and assigning the new SP to the existing SP

I think FamilyDocument.AddSharedParameter from Orchid package is what you need to begin.

Forgive me if I am wrong here, but is that just to add a Shared Parameter? Sure it was quick to add them in Revit which I already done. I want to somehow get a parameter from a door family and change it to a new parameter.

why not add it to the Category instead, a lot easier and more freedom to Tag and create schedules from.
if its not driving geometry that is

@Marcel_Rijsmus

Yes they are all driving geometry

Thank you
It would not effect any recent projects as I am still developing the template. I ended up creating the new SP’s and just opened every family and assigned the existing to the new, and once all new ones were assigned across all families and the template schedules, I just deleted the old ones. It took a while, but it’s done now.

I still think it should be straightforward to change the name though, regardless of whether it is best practice or not, especially since it was perfect for my situation. There just should be an error highlighting what you mentioned about previous projects. Errors can pop up many times in Revit for most people, and they choose to ignore them, so why should renaming SP’s be any different. I see mistakes happen everyday!

I will check out that node just to know for future reference. Out of curiosity, how did you change the name in the past?

So you won’t tell me how you did it? There are many plausible reasons why one would need to change the name of a SP; there is my case, company and national standards changing, amongst others. If SP’s are mapped to a txt file, with each SP having a GUID, then is it not the case that the name is irrelevant? If you change the name, the txt file will update and any project linked to that file will update. (I may be wrong here, but it is my limited understanding)

It can not all be about Doom and Gloom. Like I said, there are mistakes made everyday with errors, etc. Its all down to proper management and proper training.

@erfajo

Yes that is what I done as I already mentioned. I copied everything. It still look a day of work to remap everything. There must be a simpler solution, and you have one so in order for me to become this so called expert, I would love to know it please. Either with being the node you could possibly create, or the way you done it in the past.

I would love to see the node Erik
And i wonder where the data goes if someone uses the add shared parameter option in the family environment and loads the family in a project where the same parameter has been set to the category the family is in. With all options like Type Parameter in the Family, Instance Parameter in the project and the other way around.

Maybe @erfajo can shed some light on this.
Thnx

Is it possible to do something like this with element types? or is it exclusive for .rfa

Hi Eric,

we just experienced this like the company consolidate the business name, so we need to do bulk update with new prefix. I have tried what you said. but it dosent create the new shareded parameters with existing value. could you please help to identify the issue? Many thanks in advance.

@dylanpeng, did you ever resolve your graph? If yes, what was wrong?

What I had to do was simply create a New Template (RTE) & at the initial creation, Renamed the SPs in the file & did a Save As…(new name.txt) {this is the so called “taboo” part} & loaded all my SP’s into a virgin RTE file; then removed all SP’s from Project Parameter list. Then transferred all project settings from the original RTE (just had to recreate Model views, & assign View Type Settings to Sect/Elev/etc…). This was way more efficient than replacing the tons to SP’s I had in RTE & my content library. My SP count range is +100-150.