Hi all,
I am trying to learn some python forcing my self to do some scripts. Using dynamo nodes, I am able to perform this action with no problems, but doing it in python it’s a complete different thing.
At the moment I am trying to retrieve parameters name associated to project informations but I keep getting a list of (I think) Revit Objects, not the parameter names.
Please check the image below
-
This is the OUT variable from the python script
-
This is the code
> import clr > > #Import Revit Nodes > clr.AddReference("RevitNodes") > import Revit > clr.ImportExtensions(Revit.Elements) > > # Import RevitAPI > clr.AddReference("RevitAPI") > import Autodesk > from Autodesk.Revit.DB import * > > # Import DocumentManager and TransactionManager > clr.AddReference("RevitServices") > from RevitServices.Persistence import DocumentManager > > doc = DocumentManager.Instance.CurrentDBDocument > > allProjParam = [] > > collector = FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_ProjectInformation).ToElements() > for projPar in collector: > allProjParam.append(projPar.Parameters) > > > > OUT = allProjParam
From here I would like to have a list of all parameter names, not just revit objects, anyone knows how to? THANKS