Select an 'in place family' that has an 'import symbol' within it?

Is there a way, via Dynamo, to select an ‘in place family’ that has an ‘import symbol’ within it?

I guess no possible node in Dynamo yet for this task, but I tried a bit with Python but couldn’t succeed. Error as follows:

Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed. 
Traceback (most recent call last):
  File "<string>", line 17, in <module>
Exception: This family is in-place and is not supported for editing.
Parameter name: loadedFamily
1 Like

Above is an old post which hints something similar to this problem but only for loadable families.

Thanks Nirbhay!

Weird there’s no existing node for this.

Seems like you can look at all the geometry in the in place family and parse the graphic styles of the geometry. If you do that, then you can search the list to see if any of the geometry matches a know autoCAD layer name.

Here is a start (on a single selected in-place element) based off of some of Thomas’ python code from BIMorph package:
(Note, I am providing this sample as is and cannot guarantee that it will work for all scenarios. It is merely a starting point…)

and the python code:

# based on previous code by Thomas Mahon @Thomas__Mahon package: bimorphNodes

import clr

# clr.AddReference loads and imports .net assembly(dll) as python module and import all of its classes
from Autodesk.Revit.DB import *

# import Transaction methods and Document helpers
import RevitServices
from RevitServices.Persistence import DocumentManager

# access to the active document and active ui document
doc = DocumentManager.Instance.CurrentDBDocument

#Preparing input from dynamo to revit
element = UnwrapElement(IN[0])
layerNameToSearch = IN[1]
list = []
#iterate through the geometry of the family
geomEnum = element.get_Geometry(Options()).GetEnumerator()
while geomEnum.MoveNext(): 
	instGeom = geomEnum.Current.GetInstanceGeometry()
	instGeomEnum = instGeom.GetEnumerator()
	while instGeomEnum.MoveNext():
		e = instGeomEnum.Current
			graphicStyleId = e.GraphicsStyleId
			eleGraphicStyle = doc.GetElement(graphicStyleId)
OUT = list,list.Contains(layerNameToSearch)

Thanks @john_pierson! Me and my tiny brain will investigate further. :slight_smile:

@Ryan_Schultz2 Assuming that the ‘import symbol’ is a 3D object, you could try this …


NIce @Vikram_Subbaiah… will give that a try!

1 Like