In an empty model (revit file, without nothing drawn), we know how to extract lists of “BuiltIn Categories” and “Builtin Parameters” separately, using the clockwork nodes.
But in an empty model, how to list all “BuiltIn parameters” of every “BuiltIn category”?
We know how to do it in a model with elements drawed (walls, columns, etc…), and we can extrat a list from those elements, listing his parameters and categories.
But we need to do it in an empty model (revit file, without nothing drawn), and we need to list all revit “Builtin parameters” of every “Builtin Categories”, without to need to draw an element of every category.
First of all, thanks for your answer. I just test your dynamo, it’s interesting… but it doesn’t works in an empty model (a revit file, without nothing drawn: no walls, no columns, nothing).
The ouput list from “Document.ProjectParameterByCategory” is empty:
As far as we know, the “Document.BuiltInParameters” node of clockwork, lists the default parameters of the revit api, regardless of whether there is something drawn or not drawn, in the rvt file.
Thanks for your answer. We know this list, it’s very interesting. But some of his sheets have incomplete lists, and it’s not useful for us. We need to query those lists, from revit api directly…
@EiPM_Xavier If I’m understanding correctly you are looking to get the BuiltInParameters for each BuiltInCategory on an empty model… I believe the GetFilterableParametersInCommon() method does the trick. I took a swing at a Python script and it likely has a lot of room for improvement but it appears to be providing the list you are seeking:
import clr
clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.DB import *
import System
from System.Collections.Generic import List
clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.Elements)
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
builtInCats = System.Enum.GetValues(BuiltInCategory)
def getBips(bic):
bic = [ElementId(bic)]
catlist = List[ElementId](bic)
paramUtils = Autodesk.Revit.DB.ParameterFilterUtilities
paramIds = paramUtils.GetFilterableParametersInCommon(doc,catlist)
builtInParams = System.Enum.GetValues(BuiltInParameter)
bipIds = []
for bip in builtInParams:
bipIds.append(ElementId(bip))
bipDict = dict(zip(bipIds,builtInParams))
bips = [bipDict.get(pId, None) for pId in paramIds]
if bips == []:
bips = [None]
return bips
OUT = zip(builtInCats, map(getBips, builtInCats))
Here is the output Excel file, but it could use some formatting help since the lists are rather large: BuiltInCategoryBIPs.xlsx (77.9 KB)
I believe this script would fail on a model that has additional project parameters (they will just return null because of how it is written). It would need to be adjusted to return the project parameters by their IDs, right now it will only find BuiltInParameters by their IDs.
Very interesting approach Vikram, It’s good a script, thanks!
Although in “code block” shows a warning, the dyn file works (I run this dyn in an empty revit file)
hello @Vikram_Subbaiah how to know if the built-in parameters of a list are Type parameters, Instance Parameters, Family Parameters, Global Parameters, Shared Parameters
I really appreciate if the script can give output of a list of builtin parameters as same names that you could read in Revit properties of elements, as this does with LabelUtils.GetLabelFor(bip)
import clr
import System
clr.AddReference('RevitAPI')
clr.AddReference('RevitAPIUI')
from Autodesk.Revit.DB import *
import Autodesk
bips = System.Enum.GetValues(BuiltInParameter)
pdata = list()
for bip in bips:
try:
pdata.append((bip,ElementId(bip),LabelUtils.GetLabelFor(bip)))
except:
pass
OUT = pdata