Rename Shared Parameter and Aerial Paradise

By Jaime Rosales

This past weekend I had the chance to attend one of my best friend’s wedding in the Gorgeous Island of Puerto Rico. A place with so much culture amazing food and of course breath taking paradise. I had the chance to take a couple of Aerial Pictures from a Catamaran which was such an amazing experience. Let me share you one of my favorite pictures, you could use it as background, trust me, I have it as mine and it looks amazing on a 29 inch LED.

 

FullSizeRender

 

Back to Revit API, One case that caught my eye this time came from our  Community Forum.

http://forums.autodesk.com/t5/revit-api/rename-shared-parameter/m-p/5337125#M7540

Question: Is there a way to rename shared parameter already assigned to the project and/or family files? I would like to keep the GUID as it is but change the alias.

Answer: Unfortunately renaming an existing shared parameter is not possible. This comes from the SDK documentation when the RenameParameter method is used : " This operation is valid only for Family Parameters, and is invalid for Shared Parameters and Built-in Parameters."

Some workaround that I could suggest is try to export all the values of  your existing shared parameter into a temporary storage mapping each element id to its shared parameter value, delete the old shared parameter in the project file, create a new shared parameter with the updated name, and repopulate the values again in that way you will keep the GUID that you need with your new renamed Shared Parameter. it might work.

Or another work around that another contributor (PhillipM) of the forum suggested is: Change the SharedParameter to a family Parameter, Rename it and then convert it back to a SharedParameter. GUIDS etc do not change.

Thanks for reading and until next time.