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.
Solved! Go to Solution.
Solved by rosalesduquej. Go to Solution.
Dear La,
Unfortunately renaming an existing shared parameter is not posible. 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.
Cheers,
Which is a shame as in these days when the standards are not full yestablished yet the option like this would extermly helpfull, net necesseraly as API but as Revit option. The same way replacing GUID seamlesely should be allowed too. I know there are some workarounds but these are never save an relaible methods. I am currently setitng up stagdards for the company and have to deal with the existing projects which started before I joined the company, new standards and possible future national standards. It would be nice to have a tool which would allow me safely play with the data behind the geometry.
Anyway, thank you for your response, much appreciated.
Regards
L
There is actually a workaround that allows you to do this.
Change the SP to a family Parameter, Rename it and then convert it back to a SP. GUIDS etc do not change.
Regards
Phillip
@Anonymous wrote:There is actually a workaround that allows you to do this.
Change the SP to a family Parameter, Rename it and then convert it back to a SP. GUIDS etc do not change.
Regards
Phillip
Hi!
I'm interested in this workaround. Could somebody explain how someone suppose to convert back a family parameter to a shared parameter? (All I can do is creating a new shared paramater than assign it to the opened one, but I can do this without first converting it to family parameter.)
Thanks in advance!
This may work in family but in project file the option to change the SP to normal parameter is disabled.
I dont understand, what drives the family is the GUID not name so there should a way to replace the name of the parameter. Evan if I remove the SP from the file and load it again with new name Revit still uses the old name. Maybe there is away to purge the information about the old parameter name and GUID afer it has been removed.
L
So running into a bind with wanting to add company prefix to all of the shared parameters on our FAB sheets, I tried a lil experiment. I edited the Shared Parameter .TXT file and renamed it there.
Obviously all of my labels seperated, but so far I see it seems to work. The Parameter names seem crosswired though, areas such as Phase, were prefixed with JHK_.
You can clearly see the Shared Parmeter name change took here; but...
When I attempt to Edit the existing label, the name pulls in the previous version.
JHK_FAB_Line No. Worked with no issue at all, as you can see the name in the list of labels (Was previously applied.)
Anyone ever try to do this with any success? Or am I simply playing with GUID fire? (Seems the GUID's wouldn't change, since they're IN the text file as well, but then, why are the "Name" fields not fully pulling thru? (Is this a crosswired GUID running in the background at this point?)
(Sometimes you severly have to break things to understand them and reverse engineer the issues!)
Sorry it has taken me so long to reply to this. I actually forgot about this until today when notified about a new post.
There is a trick. You can not rename a shared Parameter, but you can change a SP to a family parameter through the API. Check out FamilyManager.ReplaceParameter().
Once you have changed the Sp to a FP you can then use ReplaceParamater again to replace the newly created Fp back to any user selected SP. The great thing about this method is that the original GUID stays the same as the original Parm.
I can provide a small code snippet if required.
Cheers
Phillip
My experience is that the Shared Parameter cannot really be deleted, even if it is unused. The reference remains and should you try to create a new Shared Parameter using the same GUID, it will assume the previous name. Dale
Apologies, I didn't read till the last post and responded to the solution. Phillip, I believe your suggestion only applies to a family, not a project. The code snippet would of course be appreciated. Regards, Dale
Hi Phil from KiwiCodes
You mentioned a method of changing paramter names through the API. Could you help me with a description, few screen shots on how you can do this...I found the page but unfortunately I don't code. Too hard basket? I'm a kiwi working in an architecture office in Helsinki and would be great to master this one!
Cheers
André
Hi KiwiCodes,
Could you please provide the code for this as you described in your post?
That would be great.
I am trying to translate from US to UK family parameters that we don't understand.
This issue was recently raised by one of my clients and the solution I came up with simply requires you to:
1. Change/Edit the names of the parameters in your shared parameters file
2. Check each parameter in your family to see if it is in the shared parameter file under the same name
3. If the parameter is not found by name then it checks to find it by GUID
4. If the GUID exists, a temporary parameter is created and the shared parameter replaced. This is then replaced again with the altered name definition.
This all appears to work fine.
This functionality (with a lot of other functionality) is part of ARUtils - Head of the Family.
As stated previously, I believe your suggestion only applies to a family, not a project. Project Shared Parameters are unable to be renamed whilst retaining the original GUID.
hi Phillip, any chance providing a small code snippet? i'm currently doing SPs cleanup, i can do it manually but renaming existing SPs in RFA and RVT via API is definitely the best option, by the way, is it doable to change visible too (i.e. VISIBLE DESCRIPTION in SP file)?
in fact, i cannot do it manually so API is the only option, seems 3rd party has already developed plugin to solve this issue but it only works in RFA, right? anyone can confirm it's doable in RVT? i mean via API
It only works in RFA files. The important command is the FamilyManager.ReplaceParameter that lets you keep all associations of the family parameter. Unfortunately there is no equivalent command for parameters in the RVT environment.
Can't find what you're looking for? Ask the community or share your knowledge.