Get Project Parameters , Parameter Data (name,disc, type, group) and categories they belong to, to export in excel

I’m trying to get Project Parameters Data (name,disc, type, group) and categories they belong to, but stuck almost from the start
I can get Project needed parameters and their id but I can`t find a way do get their Data (name,disc, type, group) and categories they belong to.


Any help appreciated!

Do you mean like this?

You may have to look at the Clockwork nodes for project parameters and adjust the python code to get what you want. Or there may be other packages with nodes to help you.

No, sorry maybe I provide not too much information in the start of the topic.
I’m looking project parameters that are in the manage tab like below
image

Thanks Nick I have seen the document.projectparameters node if you mean this node. Actually I cant understand how ho get from this node that I need. I can see the list of all parameters.. types .. but I cant get parameters I need. No pythin coding skills as well

I’m afraid it’s going to take python to get what you’re after. You might get lucky and find some custom nodes from someone who has already tackled this issue, or you may have to look into python yourself.

Slightly off topic Nick but I’ve started learning Python. You were definitely an influence in that. :slight_smile:

1 Like

Hello
a Python solution using ParameterBindings

# coding : utf-8
import clr

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

clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
doc = DocumentManager.Instance.CurrentDBDocument


class ParaProj():
	def __init__(self, definition, binding):
		self.defName = definition.Name
		self.binding = binding 
		self.thesecats = []
		self.group = LabelUtils.GetLabelFor(definition.ParameterGroup)
		self.type = "Instance" if isinstance(binding, InstanceBinding) else "Type"
		
	@property	
	def categories(self):
		thesecats = []	
		for cat in self.binding.Categories:
	 		try:
				thesecats.append(cat.Name)
			except SystemError:
				pass  
		return thesecats
		
	@property					
	def isShared(self):
		collSharP = FilteredElementCollector(doc).OfClass(SharedParameterElement)
		paraSharPara = [x.GetDefinition().Name for x in collSharP]	
		return 	True if self.defName in paraSharPara else False	
				

paraName = []
paraGroup = []
paraCategories = [] 
paraType = []
paraIsShared = []
iterator =  doc.ParameterBindings.ForwardIterator()
while iterator.MoveNext():
    objBind = ParaProj(iterator.Key, iterator.Current)
    paraName.append(objBind.defName)
    paraGroup.append(objBind.group)
    paraType.append(objBind.type)
    paraIsShared.append(objBind.isShared)
    paraCategories.append(objBind.categories)
  

OUT = paraName, paraGroup, paraType, paraIsShared, paraCategories

another example here (at the bottom of my article) with a TreeNode (WinForm)

2 Likes