# Replace Family Parameters with shared parameters

**URL:** <https://forum.dynamobim.com/t/replace-family-parameters-with-shared-parameters/93914>\
**Category:** Revit\
**Tags:** dynamo\
**Created:** [September 20, 2023, 2:20pm UTC](https://forum.dynamobim.com/t/replace-family-parameters-with-shared-parameters/93914 "2023-09-20T14:20:43Z")\
**Posts on this page:** 1\
**Showing post:** 15

<div class="post-metadata">

**Author:** ![GavinNicholls](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/gavinnicholls/32/190442_2.png) [@GavinNicholls](https://forum.dynamobim.com/u/GavinNicholls)\
**Post date:** [March 5, 2024, 11:52pm UTC](https://forum.dynamobim.com/t/replace-family-parameters-with-shared-parameters/93914/15 "2024-03-05T23:52:33Z")

</div>

To add to this I can see forgetypeIds are going to be on my radar so I bit the bullet and figured out how to get specs/groups by name. Much easier than I thought, I quite like them now vs the old method - targeting the human friendly name is great.

```auto
# Boilerplate text
import clr

clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager 

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

# Current doc/app/ui
doc = DocumentManager.Instance.CurrentDBDocument

# Preparing input from dynamo to revit
specs_get = IN[0]
groups_get = IN[1]

# Get forgetypeids and names
spec_ids = SpecUtils.GetAllSpecs()
spec_names = [LabelUtils.GetLabelForSpec(s) for s in spec_ids]

# Get grouptypeIds and names
group_ids = ParameterUtils.GetAllBuiltInGroups()
group_names = [LabelUtils.GetLabelForGroup(g) for g in group_ids]

# Function: Return element by name match
def element_byNameMatch(n, elements, names):
    if n in names:
        ind = names.index(n)
        return elements[ind]
    else:
        return None

# Return forgetypeIds
OUT = [[element_byNameMatch(n, spec_ids, spec_names) for n in specs_get],\
        [element_byNameMatch(n, group_ids, group_names) for n in groups_get] ]

```

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/5/45abccd4ce5254379725ef3b0c4cc3772725d970.png)

[Get forgetypes by name.dyn](https://forum.dynamobim.com/uploads/short-url/qXoea49D7WGwY2bn6t7bymOcidd.dyn) (6.4 KB)

---

_[View the full topic](https://forum.dynamobim.com/t/replace-family-parameters-with-shared-parameters/93914)._
