Get all elements of family type loaded in project, but not placed

Does anyone know a workflow to access all elements of a family type in dynamo that is loaded in a project but not placed. As it only seems to work if the families/ components are placed.



Lastly i need to work in the project environment as working with civil connection alignments so can’t work in a family.

I think a family type that is not placed in the project is not an element (instance) as such
Maybe i’m wrong.

(graph by @kulkul)

1 Like


@Matt_Gaydon starting with Marcel’s graph and Adding an all instances of Type node, a Lost.Count node, and FilterByBoolMask node and you’re well on your way to what you wanted.

1 Like

Thanks @Marcel_Rijsmus and @JacobSmall

That put me on the right track… I used a slightly different workflow after getting the element by sorting by searching for matching strings. Could not get the OOTB string contains etc or the == nodes to work as required so resorted to a python node script from here:

Here’s the code used also

strList = IN[0]
elementNames = IN[1] # Getting the names in Dynamo before Python saves unwrapping
elementList = IN[2]

searchList = []
restList = []

for n, e in zip(elementNames,elementList): # zip together names and elements
	found = False # assume search strings can't be found
	for s in strList: # Loop through the search strings
		if s in n: # test whether the string can be found in the name
			searchList.append(e) # if true, add to searchList
			found = True # set found to be true
			break # skip remaining tests as string has been found
	if not found: # if found is false after testing all strings
		restList.append(e) # append to restList

# Assign your output to the OUT variable.
OUT = searchList, restList

1 Like