Big Picture: I am trying to automate the addition of shared parameters to a project file in Revit. I have done this successfully in the past, using the SharedParameter.Add node from the Orchid package. I am currently working in Revit 2024.2, with Dynamo 2.19.3.
Here is an image of my graph:
If memory serves, in previous versions, the Parameter Groups node (formerly known as the Select BuiltIn Parameter Group node) could be used to specify in which parameter group the newly created shared parameter should appear. In the version in which I am working, the Orchid SharedParameter.Add node is asking for the groupType as Dynamo type, and I have been using the Group Types node to provide that.
My problem is that the Group Types node does not appear to have a selection that will place the parameter under the Other group. In the Parameter Groups node, you can choose INVALID, which translates into Other in Revit. Is there a choice in the Group Types node that will give me the Other group? If not, is there DesignScript code that will give me a result that the SharedParameters.Add node will accept that results in the Other group being used?
I tried running Node to Code on both the Parameter Groups node and the Group Types node, but did not get any results.
I will attach a DYN file that has what I showed in the image, in case that helps. You will need the Orchid 2.19.6150 package.
2-19-3_Add Shared Parameters Test 2024.dyn (63.5 KB)
There’s now a built in node for that…
The old BuiltInParameterGroup.INVALID
is now a ForgeTypeId
with an empty string

3 Likes
Thank you so much! Clearly there are a lot of changes in Dynamo on which I need to get caught up. I assume that other string values could be used to generate the appropriate ForgeTypeID. None I have tried worked, but I can dig for documentation on that.
I am curious as to the point of the Spec Type in the out-of-the-box node. When a shared parameter is created, the data type is specified. Does this node allow that to be changed? Or is the input here just ignored? I suppose I can experiment and find out for myself.
Not entirely sure which node you are talking about, but if it is the one Inthink you’re referencing then the OOTB node will create a shared parameter without a shared parameter file, so there is no spec type to reference.
This one:

It asks for a Group Name, so I assumed that it was reading that from the shared parameters file. So far, I have not gotten that node to produce any results, anyway.
I guess I will stick with the Orchid node, as I want it to pull from the current shared parameters file. If the node is making it up on the fly, then it would be a different parameter each time it is run, which is not what I want.
This is the Orchid node I have been using:

It allows for specifying whether values are aligned per group type or can vary by instance also, which is not a choice in the out-of-the-box node.
That node does in fact make a new shared parameter in an imaginary shared parameter file using a unique parameter GUID on each run. If you want to add existing shared parameters to a file I recommend using the standard UI.
The OOTB node does save the shared parameter into the current shared parameter text file. It also checks if the parameter already exists so the GUID does not change. However it did manage to suspend Dynamo & Revit
I agree with you that creating shared parameters from Dynamo is a rather niche use which does not seem very efficient - perhaps adding categories to an existing parameter?