# Retrieve "parameter group name" of shared parameter

**URL:** <https://forum.dynamobim.com/t/retrieve-parameter-group-name-of-shared-parameter/15905>\
**Category:** Developers\
**Tags:** python\
**Created:** [October 25, 2017, 9:38am UTC](https://forum.dynamobim.com/t/retrieve-parameter-group-name-of-shared-parameter/15905 "2017-10-25T09:38:24Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![MJB-online](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/mjb-online/32/24884_2.png) [@MJB-online](https://forum.dynamobim.com/u/MJB-online)\
**Post date:** [October 25, 2017, 9:38am UTC](https://forum.dynamobim.com/t/retrieve-parameter-group-name-of-shared-parameter/15905/1 "2017-10-25T09:38:24Z")

</div>

Hi all,

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

![groupname](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/0/c028d03f6c34fcc5eb8d3eb67ef87f7e23dac087.png)

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

---

<div class="post-metadata">

**Author:** ![Yna\_Db](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/yna_db/32/30641_2.png) [@Yna\_Db](https://forum.dynamobim.com/u/Yna_Db)\
**Post date:** [October 25, 2017, 10:47am UTC](https://forum.dynamobim.com/t/retrieve-parameter-group-name-of-shared-parameter/15905/2 "2017-10-25T10:47:40Z")

</div>

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](http://www.revitapidocs.com/2017/c6280bdf-81ea-5a41-07ad-b93092b5a470.htm)  
[https://forum.dynamobim.com/t/change-shared-parameter-group/10443/6](https://forum.dynamobim.com/t/change-shared-parameter-group/10443/6)

---

<div class="post-metadata">

**Author:** ![MJB-online](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/mjb-online/32/24884_2.png) [@MJB-online](https://forum.dynamobim.com/u/MJB-online)\
**Post date:** [October 25, 2017, 12:34pm UTC](https://forum.dynamobim.com/t/retrieve-parameter-group-name-of-shared-parameter/15905/3 "2017-10-25T12:34:36Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Yna\_Db](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/yna_db/32/30641_2.png) [@Yna\_Db](https://forum.dynamobim.com/u/Yna_Db)\
**Post date:** [October 25, 2017, 12:39pm UTC](https://forum.dynamobim.com/t/retrieve-parameter-group-name-of-shared-parameter/15905/4 "2017-10-25T12:39:16Z")

</div>

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… 🙂

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [October 25, 2017, 2:39pm UTC](https://forum.dynamobim.com/t/retrieve-parameter-group-name-of-shared-parameter/15905/5 "2017-10-25T14:39:43Z")

</div>

Hi @MJB-online

?

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/0/c07d4fe6797341cee5b6d6c9ef8fe164ba8984b0.png)

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [October 25, 2017, 3:23pm UTC](https://forum.dynamobim.com/t/retrieve-parameter-group-name-of-shared-parameter/15905/6 "2017-10-25T15:23:27Z")

</div>

You should be able to do it with standard nodes.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/2/82af3f73ea718b62daf47575f11598d65e851ecf.png)

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

---

<div class="post-metadata">

**Author:** ![MJB-online](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/mjb-online/32/24884_2.png) [@MJB-online](https://forum.dynamobim.com/u/MJB-online)\
**Post date:** [October 26, 2017, 8:03am UTC](https://forum.dynamobim.com/t/retrieve-parameter-group-name-of-shared-parameter/15905/7 "2017-10-26T08:03:57Z")

</div>

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 🙂  
Below i added two pictures to clarify the workflow i’m thinking of.

 ![SP_GetGroupNames](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/d/cde0fee93768f734ddaa3608b309f8b63ddab2f8.png)

 ![Flowchart](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/6/7617e2e32187d2c37d85bf667be6ddbb0c00ef85.jpg)

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

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [October 26, 2017, 8:30am UTC](https://forum.dynamobim.com/t/retrieve-parameter-group-name-of-shared-parameter/15905/8 "2017-10-26T08:30:39Z")

</div>

@MJB-online Drop here your Shared parameter file.

---

<div class="post-metadata">

**Author:** ![MJB-online](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/mjb-online/32/24884_2.png) [@MJB-online](https://forum.dynamobim.com/u/MJB-online)\
**Post date:** [October 26, 2017, 8:38am UTC](https://forum.dynamobim.com/t/retrieve-parameter-group-name-of-shared-parameter/15905/9 "2017-10-26T08:38:45Z")

</div>

[NLRS\_SP\_v2.0.01\_Algemeen\_plus\_IFC\_SB.txt](https://forum.dynamobim.com/uploads/short-url/Ac9oKaMvHFcoQD637YXvukzOLwU.txt) (75.1 KB)

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [October 26, 2017, 9:09am UTC](https://forum.dynamobim.com/t/retrieve-parameter-group-name-of-shared-parameter/15905/10 "2017-10-26T09:09:40Z")

</div>

@MJB-online  
?

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/3/f3e394fd58f15bb203124fac949266641cee5a02.png)

---

<div class="post-metadata">

**Author:** ![Yna\_Db](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/yna_db/32/30641_2.png) [@Yna\_Db](https://forum.dynamobim.com/u/Yna_Db)\
**Post date:** [October 26, 2017, 9:20am UTC](https://forum.dynamobim.com/t/retrieve-parameter-group-name-of-shared-parameter/15905/11 "2017-10-26T09:20:10Z")

</div>

Another option would be to import the .csv file into Excel and read the data in Dynamo from it:  
 ![Excel-shared-parameter-file](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/3/a/3a335defb4676d7df0aa6f4b5a56be0e07d48869.PNG)

---

<div class="post-metadata">

**Author:** ![MJB-online](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/mjb-online/32/24884_2.png) [@MJB-online](https://forum.dynamobim.com/u/MJB-online)\
**Post date:** [October 26, 2017, 9:37am UTC](https://forum.dynamobim.com/t/retrieve-parameter-group-name-of-shared-parameter/15905/12 "2017-10-26T09:37:54Z")

</div>

I’m a little afraid to ask for more…😥  
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

---

<div class="post-metadata">

**Author:** ![Yna\_Db](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/yna_db/32/30641_2.png) [@Yna\_Db](https://forum.dynamobim.com/u/Yna_Db)\
**Post date:** [October 26, 2017, 10:56am UTC](https://forum.dynamobim.com/t/retrieve-parameter-group-name-of-shared-parameter/15905/13 "2017-10-26T10:56:18Z")

</div>

I found something useful here: OwnerGroup

> **[Working with the Definition File | Search | Autodesk Knowledge Network](https://knowledge.autodesk.com/search-result/caas/CloudHelp/cloudhelp/2017/ENU/Revit-API/files/GUID-C6FAC918-DC11-41B6-94FD-F745C3C00D98-htm.html)**
>
> The definition file provides access to shared parameters. Accessing parameters in the definition file Use the following steps to gain access to the definition file and its parameters: Specify the Application.SharedParametersFilename property with an...

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

---

<div class="post-metadata">

**Author:** ![MJB-online](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/mjb-online/32/24884_2.png) [@MJB-online](https://forum.dynamobim.com/u/MJB-online)\
**Post date:** [October 26, 2017, 3:02pm UTC](https://forum.dynamobim.com/t/retrieve-parameter-group-name-of-shared-parameter/15905/14 "2017-10-26T15:02:28Z")

</div>

Hi @Yna_Db,

> [@Yna\_Db](#):
>
> Another option would be to import the .csv file into Excel and read the data in Dynamo from it:

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.

> [@Yna\_Db](#):
>
> I found something useful here: OwnerGroup

Programming is beyond my knowledge 😞

Kind regards,  
Mark

---

<div class="post-metadata">

**Author:** ![JustinStirling](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/justinstirling/32/79001_2.png) [@JustinStirling](https://forum.dynamobim.com/u/JustinStirling)\
**Post date:** [April 22, 2020, 7:34pm UTC](https://forum.dynamobim.com/t/retrieve-parameter-group-name-of-shared-parameter/15905/15 "2020-04-22T19:34:14Z")

</div>

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?

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/2/12e1be0b2b0b0024e6e21a63a7a4dd45e410a45d.png)

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

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/f/6fc87675300686f49ba9e70774d8ec993d41c4b3.png)

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.

---

<div class="post-metadata">

**Author:** ![Alban\_de\_Chasteigner](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alban_de_chasteigner/32/39650_2.png) [@Alban\_de\_Chasteigner](https://forum.dynamobim.com/u/Alban_de_Chasteigner)\
**Post date:** [April 22, 2020, 8:53pm UTC](https://forum.dynamobim.com/t/retrieve-parameter-group-name-of-shared-parameter/15905/16 "2020-04-22T20:53:10Z")

</div>

I don’t think you can retrieve more informations than with the _Get Shared Parameter_ node :  
 ![Get Shared Parameter](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/5/f5e99faeaeae68bcf7447dc76e4cb9f9ad3db59c.png)

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

---

<div class="post-metadata">

**Author:** ![JustinStirling](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/justinstirling/32/79001_2.png) [@JustinStirling](https://forum.dynamobim.com/u/JustinStirling)\
**Post date:** [April 22, 2020, 9:49pm UTC](https://forum.dynamobim.com/t/retrieve-parameter-group-name-of-shared-parameter/15905/17 "2020-04-22T21:49:58Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![JustinStirling](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/justinstirling/32/79001_2.png) [@JustinStirling](https://forum.dynamobim.com/u/JustinStirling)\
**Post date:** [April 23, 2020, 12:54pm UTC](https://forum.dynamobim.com/t/retrieve-parameter-group-name-of-shared-parameter/15905/19 "2020-04-23T12:54:53Z")

</div>

@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:

> [@Create project parameters by using the exported Shared Parameters from a Family](https://forum.dynamobim.com/t/create-project-parameters-by-using-the-exported-shared-parameters-from-a-family/37962/1):
>
> 4- move the parameters from the group of “exported Parameters” to the desired one.

> [@Create project parameters by using the exported Shared Parameters from a Family](https://forum.dynamobim.com/t/create-project-parameters-by-using-the-exported-shared-parameters-from-a-family/37962):
>
> Dear All, Is there a way by dynamo to do the following : 1- open the loaded family document. 2- get family shared parameters. 3- export the shared parameters to the shared parameter file 4- move the parameters from the group of “exported Parameters” to the desired one. 5- Return to the project then create a project parameters by the shared exported parameters. Till now i can create the dynamo that perform all the above mentioned points except point 3 and 4 Please any help ?

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):

> [@Is it possible to retrieve in which parameters data (Name) under which parameter group to excel by using dynamo? or else any plug in to pair the name and group name from the text file?](https://forum.dynamobim.com/t/is-it-possible-to-retrieve-in-which-parameters-data-name-under-which-parameter-group-to-excel-by-using-dynamo-or-else-any-plug-in-to-pair-the-name-and-group-name-from-the-text-file/46463/16):
>
> For information, the Parameter Group is not stored in the shared parameter text file but belongs to the ParameterElements loaded into the Revit project.

> [@Is it possible to retrieve in which parameters data (Name) under which parameter group to excel by using dynamo? or else any plug in to pair the name and group name from the text file?](https://forum.dynamobim.com/t/is-it-possible-to-retrieve-in-which-parameters-data-name-under-which-parameter-group-to-excel-by-using-dynamo-or-else-any-plug-in-to-pair-the-name-and-group-name-from-the-text-file/46463):
>
> I would need to export to excel like capture below. [image] Thanks you

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!

---

<div class="post-metadata">

**Author:** ![Alban\_de\_Chasteigner](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alban_de_chasteigner/32/39650_2.png) [@Alban\_de\_Chasteigner](https://forum.dynamobim.com/u/Alban_de_Chasteigner)\
**Post date:** [April 23, 2020, 5:12pm UTC](https://forum.dynamobim.com/t/retrieve-parameter-group-name-of-shared-parameter/15905/20 "2020-04-23T17:12:57Z")

</div>

Hi Justin,

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

 ![Parameter Group](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/6/86a0021557c967ace1c384eb6040e164a9d0a628.png)

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

---

<div class="post-metadata">

**Author:** ![JustinStirling](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/justinstirling/32/79001_2.png) [@JustinStirling](https://forum.dynamobim.com/u/JustinStirling)\
**Post date:** [April 23, 2020, 5:23pm UTC](https://forum.dynamobim.com/t/retrieve-parameter-group-name-of-shared-parameter/15905/21 "2020-04-23T17:23:32Z")

</div>

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

[Next page](https://forum.dynamobim.com/t/retrieve-parameter-group-name-of-shared-parameter/15905.md?page=2)
