Shared parameters form txt file, with group filter

Hye everyone,

I’d like to add a filter on groups param to the node "SharedParameters form txt file.

Here the python

#Copyright © mostafa el ayoubi
#Data-Shapes www.data-shapes.net 2016 elayoub.mostafa@gmail.com

import clr
clr.AddReference(‘RevitAPI’)
from Autodesk.Revit.DB import*
clr.AddReference(‘RevitServices’)
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
clr.AddReference(‘RevitAPIUI’)
from Autodesk.Revit.UI import *

doc = DocumentManager.Instance.CurrentDBDocument
uidoc = DocumentManager.Instance.CurrentUIDocument
app = doc.Application

TransactionManager.Instance.EnsureInTransaction(doc)

app.SharedParametersFilename =IN[0]
spfile = app.OpenSharedParameterFile()
gr = spfile.Groups
defp = [g.Definitions for g in gr]
defflat = [x for l in defp for x in l]
defflatname = [x.Name for x in defflat]

TransactionManager.Instance.TransactionTaskDone()

OUT = defflat , defflatname

Thanks in advance

Chi