Orchid - SharedParameter.Create fail - Autodesk.Revit.DB.ParameterType has some invalid arguments

Hello, i’m getting the following error:

Warning: SharedParameter.Create operation failed.
The best overloaded method match for ‘Autodesk.Revit.DB.ExternalDefinitionCreationOptions.ExternalDefinitionCreationOptions(string, Autodesk.Revit.DB.ParameterType)’ has some invalid arguments

Here’s the graph:
Family Create Parameter.dyn (24.1 KB)

These are the versions I’m using:

Revit Version: 2020.2.9
Dynamo Version: 2.3.2
Orchid Version: 203.6.0.5842

I had used this same node before with no issue. I’ve since gone back to the original .dyn file I used with no luck.

I consulted these posts:

… among others, but no dice.

The graph is based/copied from this AussieBIMGuru tutorial:

I’ve bee beating my head with this all day and there’s something I’m missing and not seeing.

Here’s a few things i tried already:

  • I tried adding parameters in a batch and to single families,
  • Made a new blank family file,
  • Shifted between string nodes, code blocks and dropdown selections with a String.FromObject node to make sure I was covering all bases,
  • I moved my files to a shorter path, to avoid any character-limit related errors,
  • I created a new parameter file, with new test groups,
  • Changed the Document.BackgroundOpen node to a Document.Current node (making sure to open a Family Document).

I’d appreciate any help/suggestions. Thanks in advance.

-g

Haven’t used that node, so not sure of all the inputs. One issue could be that Details is not a valid parameter group name. Just fyi, details looks to be misspelled also.

Revit has a simpler node for adding family parameters. FamilyDocument.AddParameter.

1 Like

Thanks for your input, @staylor .
Details is written in Spanish, hence the apparent misspelling. I also made sure to create a Shared Parameters Group by that same name. I think the issue is with the ‘group’ input.

I will look into the node you are mentioning and update this answer.

Apologies for the mispelling comment. Maybe there’s a misunderstanding about the parameterGroup being asked for. It’s not looking for the shared parameter group name, it’s looking for one of these parameterGroup names. From my knowledge, there’s no way to add a new group to this parameter group list.

image
image

1 Like

I see what you mean.
I understand that the first group input is for the name of the group the parameter belongs to.
Just to be safe I went back and tried what you suggested, but got the same error:

As for the node suggested in your previous post, I found one called Parameter.CreateSharedParameter but no FamilyDocument.AddParameter. Is it available for Revit 2020? I’m stuck in this version given the project I’m currently working on.

The “group” input may actually be the one where you input “Detalles” into. Yeah the FamilyDocument.AddParameter wasn’t available in Revit 2020. Not sure when it was added, so you will have to use a custom package like you have.

1 Like

Since I couldn’t get the SharedParameter.Create node to work, I just made two different graphs:

  1. one creates shared parameters (~200) from an excel file and,
  2. a second one that adds some of said parameters (~130) to a list of families contained in a folder.

Thank you @staylor for the suggestion of using OOB nodes, I used Parameter.CreateSharedParameterForAllCategories for the first step.

For future reference, here are the two graphs:
Crea Parametros - Paso 1 de 2.dyn (25.5 KB)
Crea Parametros - Paso 2 de 2.dyn (30.0 KB)

Again, most of this was plundered from the video in my opening post.

:handshake:

1 Like

Glad you were able to work around the issue. Once you get to newer versions of Revit, you will have more options.

1 Like