Revit Architecture Forum
Welcome to Autodesk’s Revit Architecture Forums. Share your knowledge, ask questions, and explore popular Revit Architecture topics.
abbrechen
Suchergebnisse werden angezeigt für 
Anzeigen  nur  | Stattdessen suchen nach 
Meintest du: 

Replace Shared Parameters

12 ANTWORTEN 12
GELÖST
Antworten
Nachricht 1 von 13
Anonymous
3483 Aufrufe, 12 Antworten

Replace Shared Parameters

Hi everyone,

 

First post here, nice to meet you all!

 

Here is my issue: I have a model where I uploaded an initial set of Shared Parameters that I am using as project parameters.

Now, the BIM coordinators gave us a new set of Shared Parameters and some of them are supposed to be substituting the old ones. They want us to get rid of the old ones and replace them with the new ones.

 

Now, I am aware that it's not possible in Revit to rename Project Parameters that come from Shared Parameters, so what I tried to do is to delete the old ones and then load the new ones. Inexplicably, when I load the new Project Parameter that should replace the old one, it takes the name of the old one!

 

Here some images to show you what happens:

(For clarity GS EQUIPMENT-ID is the new parameter, while GSSE-S2-EQUIPMENT-ID is the old one)

ProjectParam.PNGSP.PNGEQUIPMENT-ID.PNGWrongName.PNG

 

I can't understand how Revit remembers the old parameter and how to make it "forget" it so I can happily upload the new parameter.

 

Does anyone have any idea on how to solve this?

 

Thanks a lot!

 

Andrea

12 ANTWORTEN 12
Nachricht 2 von 13
ToanDN
als Antwort auf: Anonymous

I don't think it is possible within Revit.

 

Once you loaded a shared parameter in the project, it is there regardless of you doing anything the shared parameters txt file.  Loading a new shared parameters file in only allows you to add new entries, not changes what already in the project.  Even if you delete a shared parameter and create a new one with the exact same name, when you load it in project, it is a new parameter and not a replacement of the old one.

Nachricht 3 von 13
Anonymous
als Antwort auf: ToanDN

Hi ToanDN,

 

Thanks for the reply.

 

The two parameters (the old one and the new one) are actually two different parameters, from two different .txt files and with two different names! I would be more than happy to add a new entry through the new shared parameter.

 

The weird thing is exactly that. The SP txt file that is now loaded in the project doesn't even include that GGSE-S2-EQUIPMENT-ID parameter that keeps re-appearing. But somehow there must be a hook or something that every time I try to load GS EQUIPMENT-ID makes Revit remember that it already had a similar parameter but with a different name, so it automatically changes it to the old name as in the last image.

Nachricht 4 von 13
ToanDN
als Antwort auf: Anonymous

How did you create the new shared parameters file?  Did you edit the old txt file manually in some text editor then save as a new file?

Nachricht 5 von 13
Anonymous
als Antwort auf: Anonymous

Hi Toan,

No, the first shared parameter file has never been modified.
The second shared parameter file was created normally through Revit.
Nachricht 6 von 13
Anonymous
als Antwort auf: Anonymous

There is one plug in that purge parameters so maybe you can try with that.Of course if you want to get rid of the old one..https://www.youtube.com/watch?v=q4Ne-EuV-s0  

Nachricht 7 von 13
Anonymous
als Antwort auf: Anonymous

Hi dcesko,

 

Thanks for the suggestion! It actually gave me enough info to get to the solution.

 

At the end I noticed that the only way to solve this issue was to delete the parameter's ID. In this way Revit completely "forgets" about the existence of the parameter and doesn't re-associate the name when you try to load the new one.

I didn't find how to do it directly in Revit (probably due to my limited knowledge) so I created a Dynamo script to do it. Now it works perfectly!

 

Thanks guys!

Nachricht 8 von 13
Anonymous
als Antwort auf: Anonymous

Hi AndreaTas,

 

 

You wrote: I didn't find how to do it directly in Revit (probably due to my limited knowledge) so I created a Dynamo script to do it. Now it works perfectly!

 

Can you show us your Dynamo Script?

That would reeaaaaly help me! Thank you so much in advance! :leicht_lächelndes_Gesicht:

Nachricht 9 von 13
Anonymous
als Antwort auf: Anonymous

Hi @Anonymous,

 

Yeah sure no problem!

 

The workflow is actually constituted by 4 Dyanmo scripts:

1) create a "dummy" parameter to temporarily hold the values of the parameter you want to substitute and to assign this parameter to all the categories

2) copy the values of the parameter you want to substitute to the temporary dummy parameter

3) the script that actually deletes the old shared parameter completely from Revit (screenshot below)

4) copy the values from the dummy parameter to the new loaded (manually) correct parameter.

 

This is the script to delete completely a shared parameter in Revit:

 Capture.PNG

As you can see, archi-lab's node Element.Delete is not in the new package anymore unfortunately, but I haven't had the time/need to modify the script recently so I'll post it as it is. Perhaps you still have an older version of the package, otherwise it is just going to be a matter of replacing that node.

 

I hope this helps :zwinkerndes_Gesicht:

 

Andrea

Nachricht 10 von 13
EddieSaez
als Antwort auf: Anonymous

ATassera,

Interested in this post as I need to achieve something similar but with Project parameters.
Would you be so kind as to share all 4 dynamo scripts? (can provide email if you don't want to post on here)
I will happily share my results once resolved.

Thanks,

Eddie

Nachricht 11 von 13
Anonymous
als Antwort auf: EddieSaez

Hi @EddieSaez,

 

Happy to share my graphs if they can be useful!

But it's probably better if you write what you're trying to achieve so we can try to help...

 

Anyways,

#1

1.PNG

#2

2.PNG

#3

3.PNG

#4

4.PNG

Nachricht 12 von 13
EddieSaez
als Antwort auf: Anonymous

Perfect...
Gives me somewhere to start.
(Still learning Dynamo)

 

Really appreciate you sharing these.

Will let you know I go.

 

Regards,

Eddie

Nachricht 13 von 13
tamas.deri
als Antwort auf: Anonymous

Be aware that with deleting SharedParameterElements from your project you can **** up all your families, especially tags that use that parameter (if those sp-s also added to these families even as labels, or as geometry driving parameters). It can make labels inside of tags deleted completely if they refer to that shared parameter, and you will get no notification about this at all.  You will be really sorry if this happens. Been there, done that...

Sie finden nicht, was Sie suchen? Fragen Sie die Community oder teilen Sie Ihr Wissen mit anderen.

In Foren veröffentlichen  

Autodesk Design & Make Report