How can i ask, wether the parameter exists?

Hello Dynos,

I want to distinguesh editable and system families

import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
from System.Collections.Generic import *
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument
app = DocumentManager.Instance.CurrentUIApplication.Application

elements = UnwrapElement(IN[0])
result = []

for i in elements:
	for j in i.Parameters:
		p = i.LookupParameter("IsEditable")
		result.append(p)

OUT = result


My code runs pretty well… but without result.

How do i “look” wether a parameter exists in an instance?

KR

Andreas

@SpenceOJAS ,

thanks… how can i set it with a boolean?
so f.e. systemfamilies does not have this stuff!

i want to filter editable and not editable families!

KR

andreas

Ah okay I think i get it now :slight_smile:

So you want to use that property to filter between system/placeable families?

1 Like

How about this, @Draxl_Andreas:

elements = UnwrapElement(IN[0])
result = []

for i in elements:
	try:
		type = i.Symbol
		result.append(type)
	except:
		result.append('system family')

OUT = result
1 Like

2 Likes

@newshunhk ,

is there homepage where i can see how the parameters are structured… f.e. like buildingsmart is doing it?
grafik
is there also something like that in Revit?

…i see the solution, but i can`t follow :wink:

KR

Andreas