Create Project Parameter from Shared Parameter

Looking at creating a couple Project Parameters from Shared Parameters.
In testing my graph, it looks to run as I’d expect when a project is created and Dynamo is opened fresh.
However, if I delete the Project Parameters and run it again the Parameters are not recreated. Closing and opening the project and the graph then an error is thrown and the node turns wacky.
It appears that the parameter, even though it is deleted actually still exists.

Thoughts?

1 Like

It might be not the parameter but the parameter group (already there) delete that aswell
(don’t know how btw, just reasoning here)

Hi @erfajo - I looked briefly at the implementation:

I think that the node naming of the node is not aligned with the revit API/UI and instead was intended to be simpler to understand for new users - but I agree it seems to only add confusion since internally this node creates shared parameters using a shared parameter file.

I think in this case the group is used just as a way of avoiding collisions between parameters in the shared parameter file with the same name.

I defer to the community or Revit teams usually on Revit API functionality though. If you think we should get rid of this input, we can obsolete this node and change it in 3.0.

1 Like

actually @mdhutchinson looking back at your image - I think the error stems from the broken dropdown node. That second output is probably returning null.

I think the bug here is that the dropdown node is not updated to work with dynamo 2.x or something else is loading json.net.

Is that an OOTB node? (Parameter Groups)

This is the version I am on currently.

FYI: I needed a Project Parameter that comes from the Shared Parameter file, as I need to be able to Schedule as well as Tag the element. As I understand it this is the only Parameter Type that can be Scheduled as well as be able to be used in a Tag. Isn’t this correct?

source: http://paulaubin.com/blog/revit-parameters/

In our company we share the shared parameters (protocol) as a file with our project partners such as construction and the MEP guys aswell. Consistancy is key in some projects.
This allows us to create filters that work for all, and in all models, for instance.
It’s part of our collaboration strategy and it is working very well.

In addition:
If you could make me a node that would give me the value of a parameter by parameterGUID it would make me very happy.

Maybe i didn’t explain very well.
We have cases where we end up with double, triple or many Shared Project parameters with the same name.
Only one of those is the original shared parameter from the shared parameter file with its GUID.
Imagine we have a Dynamo workflow where we use SetParameterByName and i use that name of the multiple parameter.
Where does the data go?
You see?

People tend to copy from linked files bringing in the parameters aswell, and people tend to create parameters that are already in the project evironment when creating families (you can only know when you were aware of that). We have Reviteers with little experience and full blown masters.

another scenario:
Lets say we have a shared project parameter set to some category as a type parameter. Now make a family with that same shared parameter set as instance and load the family in the project.

next scenario:
Lets say we recreate the parameters with that same name as family parameter (so not the shared one) when editing a family and load it.
What happens?
Maybe i missed it in your nodes but can you make something that solves this?

Yeah, sort of…
A workflow where i can round up all data values set to the faulty parameters and set it to the correct one, concat if nessesary (there might be two), then delete the parameters.

I can understand that you cannot program around stupidity :slight_smile:

1 Like

So, where does this leave me?

as # erfajo pointed out, this can be done manually from inside of Revit by the user. And, I’ll admit, it is easy to do. I was hoping to automate as much as possible for this overall Dynamo solution - to gain buy-in from the users.

So, I am needing parameters associated to the Room objects… the only way I know of doing this is through a Project Parameter… and since you cannot use it in both schedules and a tag, this is the reason it needs to be a Shared Parameter.

See image below:

In the project parameters dialog you can choose a shared parameter when you click add, is this what you mean?

Sorry, that last post wasn’t clear enough. However, this is why I titled original post. “Create Project Parameter from a Shared Parameter”… the answer to your question is definitely yes.

I need Parameter that can be both Scheduled as well as shown in a tag.

I am green with revit, I’ll admit. Isn’t this the only way to get that?

it is.
in a tag family you can add the same shared parameter inside a label, but make sure you have a shared parameter file
and as soon as the shared parameter is added to your project parameters
you can schedule aswell
the same values will be shown in schedule and tag alike

1 Like

Exactly!

Where did I miss communicate?

Why are others on this thread seem to be pointing me in another direction?

It is exactly this process that I want to automate with Dynamo.

I already have the Shared Parameters I need in the file.
So are you saying that there is currently no way to automate adding the Project Parameters I need using Dynamo?

YES! This is what I mean.

I did some searches here on the forum.
I dont know what version of Dynamo/Revit you are working on, but i can see talk about an OOTB node that does this., haven’t tested it myself, and i see a lot of post that speak of one parameter at the time, but still.
It all seems to come down at setting the shared parameter in your project first, no option to browse to the file, but i might be wrong.
It seems to me that @erfajo has a lot of experience with this, maybe he can provide a workflow/dyn
This might be a good start

:grinning: perhaps I didn’t understand the suggestion. And, I get that I am “on the wrong track”

I tested using only (first) the Shared Parameters file I had previously manually added required Parameters to. Without adding the Project Parameters, I created a new Room Tag learing that I could indeed select the Shared Parameters for the labels. When I used the resulting Room Tag the Parameters came in with only Question Marks for the Shared Parameters. I selected the Room looking in Properties Palette for the parameters but they were not listed. I found I had to add the Project Parameters. When I did, the Question Marks in the Tag went away. It was only then that could select the Room and fill in the values in Properties Palette. The Tag updated as I expected.

I think I understood from the discussion thread, particularly from your replies that the OOTB Node is currently not working… :thinking: I couldn’t make sense of several of the suggestions.

Was there a revised node that I overlooked, and if so, how do I load it into my dynamo?

???

Hi.
If you recreate the graph extract below and run it then the following should happen;
Parameter.CreateSharedParameter will create a parameter Tested in the group Testing in your shared parameter file if it doesn’t already exist. If it does exist then you shouldn’t see anything change.

Parameter.AddSharedParameter will create a shared parameter in your shared parameter file if it doesn’t exist AND also create a project parameter at the same time, which is what I understand you want to do. This node is not OOTB and is in the Orchid package created by @erfajo.
if you find the graph doesn’t behave accordingly then I recommend closing Dynamo and perhaps the file Revit file you are using and then trying again.
I also recommend freezing the Parameter. node you aren’t testing to fully understand the differences between them when you run them.
Hope that helps and is what you were looking for.

image

bringing in the parameters is what matters here.
we need to create the parameters with the correct GUID
it could be any shared parameter file, and this one is not mine and just an example
i have seen Jeremy’s work following your link, if it cant be done it cant be done
appreciate your efforts tho
and @antevasin’s too which i have not tested but seems promissing

add:
there must be some misunderstanding here somewhere, as i cannot believe that @mdhutchinson and i are missing the point
is Jeremy saying every parameter bought into the project is a shared parameter by definition?
listed as (shared) project parameter or not?