Retrieve "parameter group name" of shared parameter

Hi all,

Does someone know if there is a way to retrieve the “parameter group name” of a shared parameter?

groupname

I hope there are packages/nodes that can do this (but i am not aware of).
If this is not the case, i’m afraid it has to be done by Python, but thats beyond my knowledge.

Thanks in advance,
Mark

Please add some information to this request. For instance, there could be some clues to get started here:
http://www.revitapidocs.com/2017/c6280bdf-81ea-5a41-07ad-b93092b5a470.htm

Hi @Yna_Db,

Thanks for your response.
Basically i’m looking for a node that takes the name of a shared parameter as input.
The node then checks the current/loaded shared parameter file for the group id of the above shared parameter.
Once the group id is known, it can lookup the corresponding group name, and return it as a string.
I hope that makes sence.

Kind regards,
Mark

Someone proficient in Python could probably confirm or infirm that it could be done. It would be useful to gather related elements here in the meantime so we all learn something from it… :slightly_smiling_face:

Hi @MJB-online

?

You should be able to do it with standard nodes.

Edit: Sorry. Noticed you wanted to check within the shared parameter file itself.

Hi all,

Thank you very much for your responces.

@Nick_Boyts, It’s like you metioned (in your edit), i had another worflow in mind, but thanks for your contibution.

@Kulkul, This is very close to what i had in mind :slightly_smiling_face:
Below i added two pictures to clarify the workflow i’m thinking of.

I hope it makes sence.
Thanks again for all the help so far.

@MJB-online Drop here your Shared parameter file.

NLRS_SP_v2.0.01_Algemeen_plus_IFC_SB.txt (75.1 KB)

@MJB-online
?

Another option would be to import the .csv file into Excel and read the data in Dynamo from it:
Excel-shared-parameter-file

I’m a little afraid to ask for more…:disappointed_relieved:
But if i put in a parameter (or list of parameters), i would like to know to which group(name) they belong.
So a (list of) groupname(s) that corresponds to the parameter(s) of the input.

But if it’s to much to ask, don’t bother.

Thanks again,
Mark

I found something useful here: OwnerGroup


It should be possible to get the OwnerGroup Name on parameters definitions.

Hi @Yna_Db,

That is a good plan B, only downside is that i will have to create a new excel file every time i update my Shared Parameters.

Programming is beyond my knowledge :disappointed:

Kind regards,
Mark

What if I don’t have the SP .txt file associated with the project or family? Is it possible to recreate this file in it’s entirety, or is some of the information lost?

I’m gathering some of the information in this manner:

I’m especially having a hard time getting the unique Group ID/Names (13 of them listed in the screenshot above).

Any help or guidance is greatly appreciated.

I don’t think you can retrieve more informations than with the Get Shared Parameter node :
Get Shared Parameter

The parameter group (or the group names can therefore be exported)

2 Likes

Wait…this node is pulling from the active SP file? I don’t have the file so I’m trying to recreate it. Maybe this isn’t possible? The screenshot I provided in the post above is merely an example of what I’m trying to do, not the actual SP file for this project.

@Alban_de_Chasteigner, I think I may still need to clarify. The step I’m trying to accomplish is #4 in a separate post you were also involved with:

In mycase, the desired group is whatever group existed in the missing SP file.

In another post, you referenced what I think this missing group just might be (ParameterGroup):

Since the ParameterGroup is stored in the project, rather than the SP .txt file, I was hoping to be able to dig it up.

I have a feeling it’s only achievable via python, and maybe has something to do with this section of your code for “Get Shared Parameter

	sp=SharedParameterElement.Lookup(doc, defi.GUID)
	if sp != None:
		tempGroups.append(sp.GetDefinition().ParameterGroup)
		tempGroupLabels.append(LabelUtils.GetLabelFor(sp.GetDefinition().ParameterGroup))

but that’s about all can figure out since I haven’t learned much about Python yet.

I hope this is a cleaner explanation of what I’m trying to accomplish. Is this achievable in a project file, family file or both?

Thank you so much for your valuable time!

Hi Justin,

It is a little clearer.
You can find the ParameterGroup with OOTB nodes or custom nodes.

I think that by assembling the different bricks you should get your way.

1 Like

What is the Python script at the very beginning doing…anything special or just gathering model elements?