# ParameterGroup of SharedParameters INVALID?

**URL:** <https://forum.dynamobim.com/t/parametergroup-of-sharedparameters-invalid/59713>\
**Category:** Developers\
**Tags:** python\
**Created:** [January 25, 2021, 6:39pm UTC](https://forum.dynamobim.com/t/parametergroup-of-sharedparameters-invalid/59713 "2021-01-25T18:39:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![johanboo](https://avatars.discourse-cdn.com/v4/letter/j/94ad74/32.png) [@johanboo](https://forum.dynamobim.com/u/johanboo)\
**Post date:** [January 25, 2021, 6:39pm UTC](https://forum.dynamobim.com/t/parametergroup-of-sharedparameters-invalid/59713/1 "2021-01-25T18:39:16Z")

</div>

Hi everyone,

What could be the reason that the ParameterGroups of all the parameters in the shared parameter file are showing as ‘INVALID’? I know that ‘Other’ in the UI shows up as ‘INVALID’ in Dynamo, but even parameters that have been assigned to ‘Text’ for example keep showing ‘INVALID’.

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

What am I missing?

Thanks in advance!

Johan

---

<div class="post-metadata">

**Author:** ![johanboo](https://avatars.discourse-cdn.com/v4/letter/j/94ad74/32.png) [@johanboo](https://forum.dynamobim.com/u/johanboo)\
**Post date:** [January 27, 2021, 6:41pm UTC](https://forum.dynamobim.com/t/parametergroup-of-sharedparameters-invalid/59713/2 "2021-01-27T18:41:22Z")

</div>

Does anyone have a clue?

---

<div class="post-metadata">

**Author:** ![c.poupin](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/c.poupin/32/89152_2.png) [@c.poupin](https://forum.dynamobim.com/u/c.poupin)\
**Post date:** [January 27, 2021, 9:05pm UTC](https://forum.dynamobim.com/t/parametergroup-of-sharedparameters-invalid/59713/3 "2021-01-27T21:05:31Z")

</div>

Hello @johanboo  
INVALID is returned because there is no “ParameterGroups Enum” in your shared parameter file, just groups created by user.

if you want to search ParameterGroups for your Shared Parameters loaded in your project you can do this (with [SharedParameterElement.Lookup() method](https://www.revitapidocs.com/2020/4dce82de-7495-523a-c8d4-4b3fc709e85e.htm) )

```
import clr
clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.DB import *

clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument
uiapp = DocumentManager.Instance.CurrentUIApplication
app = uiapp.Application

lstDef = []
gpNames = []
spf = app.OpenSharedParameterFile()
if spf is not None:
	spfGroups = spf.Groups
	for group in spfGroups:
		for def_ in group.Definitions:
			guid = def_.GUID
			spInproj = SharedParameterElement.Lookup(doc, guid)
			if spInproj is not None:
				defInproj = spInproj.GetDefinition() 
				pGroup = defInproj.ParameterGroup
				lstDef.append(defInproj)
				gpNames.append(LabelUtils.GetLabelFor(pGroup))

OUT = lstDef, gpNames

```

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/7/478983f9e8a77b392f350b4dc330132793a5881d.jpeg)

---

<div class="post-metadata">

**Author:** ![paris](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/paris/32/144289_2.png) [@paris](https://forum.dynamobim.com/u/paris)\
**Post date:** [January 28, 2021, 9:26am UTC](https://forum.dynamobim.com/t/parametergroup-of-sharedparameters-invalid/59713/4 "2021-01-28T09:26:15Z")

</div>

Hi @c.poupin do you know if I can permanently change a parameter group into python? please see this post for reference if possible, [Unable to permanently change a parameter group](https://forum.dynamobim.com/t/unable-to-permanently-change-a-parameter-group/19556)  
Thanks in advance  
Cheers

---

<div class="post-metadata">

**Author:** ![c.poupin](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/c.poupin/32/89152_2.png) [@c.poupin](https://forum.dynamobim.com/u/c.poupin)\
**Post date:** [January 28, 2021, 12:09pm UTC](https://forum.dynamobim.com/t/parametergroup-of-sharedparameters-invalid/59713/5 "2021-01-28T12:09:09Z")

</div>

Hello @paris  
I replied on this topic

---

<div class="post-metadata">

**Author:** ![johanboo](https://avatars.discourse-cdn.com/v4/letter/j/94ad74/32.png) [@johanboo](https://forum.dynamobim.com/u/johanboo)\
**Post date:** [January 28, 2021, 7:22pm UTC](https://forum.dynamobim.com/t/parametergroup-of-sharedparameters-invalid/59713/6 "2021-01-28T19:22:13Z")

</div>

Thank you @c.poupin, this was exactly what i was looking for.
