Shared Parameter value don't show up in element's tag (Dynamo 2.13)

Hi everyone!

I’ve built a dynamo graph to create shared parameters from an excel file in a Revit 23 project.
For some reason, the value of one of these parameters don’t show up in the element tag.

The weird thing is that if i create the same parameter manually, the tag is able to get that value.

I apreciate all the help in advance. Could it be some related to the way Dynamo is getting parameter type or spec type? I can’t get it at all.

Link to the topic where i got the help to get Parameter Group Types:

And the same to get Spec Types:

It’s hard to answer your question without more information.
Your problem suggests that the 2 shared parameters are not the same (admittedly with the same name, but with a different GUID, created via 2 different files)

Ok, i’ll try to explain in more detail.
Regardless of how the parameters are created, they always comes from the shared parameter file. The one i used for example have these properties:
image

I have an excel file where i keep all the properties that are not in the txt file, so i can get that info by Dynamo. The workflow is explained in the following image:
image

In the end, this are the properties from the parameter created by dynamo.

The one created manually has exactly the same properties:

So, i guess the problem is somehow in the way dynamo creates the parameters.

Edit: i noticed now that the tooltip description of the parameter created by dynamo graph is different from the original one.

Cross check they have the same GUID. If it isnt reporting the value my guess is you’re making the same parameter with name, but it’s not in fact the same shared parameter at the source where the GUID is used by Revit.

2 Likes

Thanks for your sugestion @GavinCrump

For the parameter created by dynamo, i get this results:

And for the one created manually, the same ones:

I thought it was strange to get two parameters with the same name, with different GUIDs, but as it works for the parameter created manually, i suppose that’s not an issue.

Any ideas?

My only thinking here is that the project parameter creation needs to be done differently. Personally I’m not familiar with the needed API, but the pre-existing shared parameter needs to be used via the parameter service as opposed to newly created with the same name/group etc.

Hopefully someone else can shed more specific light on this.

1 Like

Thanks @GavinCrump. Its indeed a new method so i really don’t know what to do.

@Sean_Fruin, did you have the same issue?

Was this done in a brand new, completely empty, template file or an existing project? To me, it looks like you have two shared parameters with the same name but different Ids. If the “bad” parameter already exists, then recreating the “good” one still leaves you with two parameters. You may just be getting lucky when manually creating the parameter. I’ve had similar things happen when parameters get a little funky.

Have you checked your SPF for duplicate parameters? Can you share a screenshot of how you’re creating the project parameter through Dynamo?

Hi @Nick_Boyts.

I’m creating a template from scratch so it was usefull to have a dynamo script to add all the shared parameters at once. Also, I checked and there are no duplicated parameters and it’s not suppose that they exist, because either they are added to the project by dynamo or manually.

Yes, i checked all the SPF groups searching for duplicate parameters and there were only one.
Here’s a screenshot. Hope it can help.

Can you post the graph image again but with node preview bubbles pinned for all nodes? That way we can actually see what’s going on in your graph.

So just to clarify:

  1. You started with a brand new, clean file.
  2. It contained ZERO instances of the parameter (shared or not).
  3. You created the shared parameter through the Dynamo graph.
  4. How many instances of the parameter did you end up with after running the graph? One or two?

EDIT: One thing I do notice in your graph is this section.
image
This value is always going to be false since null will never be a string. So you may be returning objects that you don’t mean to and either creating duplicate parameters or ending up with a list mismatch somewhere else.

Here’s the graph with preview bubbles.
Just say if you need more bubbles.

  1. It’s a brand new file, but not clean, because it’s a project template. It contains: view templates, drafting views, legends, sheets and families. It’s supose to have the project (shared) parameters which are used in schedules (not created yet)

  2. There are none of these parameters in the revit file.
    image
    NOTE: Even so, the dynamo graph could identify those that were already add and filter them, in order to do not create duplicate parameters.

  3. That was the first try. I did it manually afterwards to understand the issue.

  4. The dynamo graph creates one instance for each one of the 28 parameters.

About the null question, you’re absolutely right! Thanks for spot this one.
That was a step i did to validate the parameter properties in the Database. I don’t know why i did that way, but i remember i was struggling with that validation because i did’t get true when val was null. Altought its result doesn’t affect the shared parameters creation for this shared parameters group, I can use a python node to do that validation.

Thanks. That helps. However, your image is now zoomed out too far to read the node titles. Make sure you’re zoomed in enough so that they’re visible when you export the workspace image.

Sorry, didn’t check it.

project parameters created by dynamo

The graph looks fine after a quick review. You said that running the graph in this new template gave you 28 unique parameters. No duplicates. Which is what you’d expect. However, your graph shows only 27 parameters, with one being filtered out, so you should only end up with 26 parameters from Dynamo. But Revit shows 27 parameters total. Did you miscount somewhere? Did one already exist?

Your initial project had two parameters with the same name but different Ids. Can you do the same check to see if you get two parameters with two different Ids in this project? It could still be that the specific project you initially looked at had a duplicate from somewhere else.

I ran the graph once before, but revit hadn’t the right shared parameter file, so one parameter was inded add before the image above and i missed it.
The other parameter was filtered out because it had one misspelled category name (already fixed in Database).

Your initial project had two parameters with the same name but different Ids. Can you do the same check to see if you get two parameters with two different Ids in this project? It could still be that the specific project you initially looked at had a duplicate from somewhere else.

I’ve created a new project from the project template, deleted all the shared parameters using Dynamo (incluing those two “HID_Ref”). After that i added the shared parameters using dynamo and all the 28 parameters were created.
The tag problem is stil unsolved… It can’t read the value of the parameter in the element tagged.

But your initial project showed one parameter but still returned two unique Ids from the project. Have you checked this again on the new template to confirm that you indeed have two unique parameters?

Yes and it gave also two unique Ids.

Hmmm. Have you confirmed none of the families you’re trying to tag have a parameter by that name already loaded? Did you run that same graph before adding the parameters via Dynamo? Just to confirm that there are none before running your script?

The only other thing I could possibly think of is that it’s creating two separate parameters for one or more different categories? But that shouldn’t happen. And even if it did, it should still be the same parameter.

I use the parameter HID_Ref to set elements references. In the first post image it’s selected a pipe fitting, but i use this parameter for pipes too. And Pipes are not family base.

Surprisingly, deleting the project parameters in Revit is not enough, because the dynamo graph returns two shared parameter elements with “HID_Ref” name.

So, i deleted all parameters using dynamo, before i run the graph to add shared parameters to the project for Pipes category only.
Somehow, when i search for GUID, there’s only one shared parameter element, like you suspected.

However, the tag still can’t get the parameter value.

Thanks for your help, this issue is driving me crazy.