Load family into project with a custom shared parameters

So basically i wanted to make a manual input family into projects with certain criteria.

first thing first is, ive already my shared parameters.txt. in this case im just gonna use the unit cost parameters only.

so the script runs to open the family.rfa in the backgrounds. the first criteria is change the family category to generic models. then add shared parameters into the family. but theres 3 input required to the SharedParameter.AddByFile node.

I dont know any about the grouptype input. is it im using the wrong node or something

These are example if im doing it from revit, theres no any “Grouptype” when adding parameters into family.

Is there any what i should input into that node, and how im getting the grouptype
Thanks for the help!

I thought there was a selection node for that, but I must be confusing it with another parameter input…

I believe that’s the ForgeType that represents the internal grouping for the parameter type. (i.e. if you have a Length parameter it would be under the Dimensions/Geometry group.)

You may have to do some investigating to find what group your parameter is under. You can always add these parameters to a project and then use Dynamo to retrieve that information so you know what you need to provide in this graph.

Heres im trying to using GroupType.ByName. im trying to trying one by one based on this data type (See image)

As you can see theres error saying “numbers” is invalid parameter group

then i try to using “Text” it works, but i didnt know what else after “Text”.

without any error, but still the family parameter doesnt updated. nothing is changed.

is it because the grouptype? little bit confusing

Keep in mind, this method is adding an existing shared parameter (that’s already defined) to a family. I’m assuming it’s using these values to “search” for the matching parameter in the text file. If a match for that parameter isn’t found, then nothing will happen.

Rather than guessing at a name, I’m suggesting you get the GroupType directly from an instance of that parameter. Here’s an example from a family document, but you could also do this from a project document as well.


Just as an FYI, the API name doesn’t always match the user facing name? I think the node will accept either but it’s just a weird situation to be aware of.

Hmm i think the nodes not “Search” for the macthing param in the text file. ive already tried your method and this error comes up

Cause it says, its need to be the same length of groupname, group, and instance.

my parameters.txt file looks like this

is there anything ive missed? hmm pretty confusing.

Exactly. It says it can’t lookup a value because the input keys don’t match in length. You need to provide the groupType of the parameter you’re looking for. You can’t just provide all the groupTypes and expect it to use the right one.

This is why I said you need to setup a test scenario where the parameter already exists so you can get the groupType from the parameter. Then you’ll know which value to provide the lookup.

Thanks!

now ive already get what i wanted to. by exporting the txt to csv file. using this method

but i wanted to hardcoded the groupTypes selection to grouptype = data.

is there a way to hardcoded the dropdown selection node?

Edit:
nvm, just got it!

Thanks you so much!