Get Categories of ExternalDefinition


#1

im try to get categories of ExternalDefinition (shared parameters)

my code (trouble at string -this im want to get: names_params=… x.Categories):

import clr
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *
doc = DocumentManager.Instance.CurrentDBDocument
uiapp = DocumentManager.Instance.CurrentUIApplication
app = uiapp.Application
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
import System
from System.Collections.Generic import *

groups_=app.OpenSharedParameterFile().Groups

def_params= [i.Definitions for i in groups_ ]
names_params=[[[x.Name, x.ParameterType, x.Categories ] for x in i] for i in def_params]

OUT=  zip(names_groups, names_params) 

if somebody now how get Categories , please help


#2

image