Solids in the Revit Element

Hello,
How shall we get the solid in a Revit element which is defined for fine detail level. Currently when we select an element, the “Solids in this element” node gives only the solid defined for medium detail inside the family. Suppose if we set the visibility of one solid in medium detail and other solid in fine detail inside the family, the dynamo gives only the solid defined for medium detail. Is there any possibility to extract the solid defined for the fine detail?

Hi,

it is possible with Python for sure.
When extracting geometry of the family instance you have to set the options variable to accept only elements from Fine Detail Levels.
Try this:

import clr

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

clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.GeometryConversion)

opts = Options()
opts.DetailLevel = ViewDetailLevel.Fine

gElem = UnwrapElement(IN[0]).get_Geometry(opts)

solids = []

for gObj in gElem:
	if isinstance(gObj,GeometryInstance):
		for iObj in gObj.SymbolGeometry:
			if isinstance(iObj, Solid):
				solids.append(iObj.ToProtoType())		


OUT = solids
1 Like

Yes, this is working. Thanks a lot !

1 Like