Dynamo 2.13 Get all Parameter Group Types

Hello there!

I’m building a dynamo graph to create shared parameters from an excel file in Revit 23, using Dynamo 2.13.

The Spec Types issue is solved with @c.poupin answer in @Sean_Fruin’s topic:

However, i’m can’t find a way to get all Group Types (Revit.Elements.GroupType or Revit.Elements.GroupTypeId)

So i really need some help.
Thanks.

I think i’m getting closer, but not good enough…

import clr

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

gN = []
gT = []

prop_infos = clr.GetClrType(GroupTypeId).GetProperties()
for p in prop_infos:
    gN.append(p.Name)
    gT.append(p)

# Assign your output to the OUT variable.
OUT = gN, gT

Hi,
try this

import clr
import sys

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

prop_infos = clr.GetClrType(GroupTypeId).GetProperties()
dict_forgeGroupTypeId = {p.Name : p.GetGetMethod().Invoke(None, None) for p in prop_infos}
OUT = dict_forgeGroupTypeId
1 Like

Thanks a lot @c.poupin!
That was the key to unlock the solution.

Python script after Dictionary.ValueAtKey:

import sys
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *

forgeTypeIds = IN[0]

output = []
for id in forgeTypeIds:
    output.append(id.TypeId)

OUT = output
1 Like

@c.poupin i notice that the values of project parameters created by the dynamo graph don’t show up in element tags.
However, that issue doesn’t exist if i create the project parameters manually.

Do you know something, that can prevent this issue?

Hi, @simoes.rja
create a new topic, your question is not related to this one (and the topic has solved)