Get void of Family type in a project

Dear Dynamo Specialists,

I would like to get the VOID in the Family of the door. See first picture door Family.
The big question is to get the area op the door opening.

This picture is the door opening created by the void in the door family.

When I open the door family you can see the “Doors (Void)”
How can I get the area, geometry or element of the VOID in the project where this family is loaded?

@rlandkroon , hi

You can solve this with parameters a*b … store the result in an Parameter … :wink:



solution by analyzing cut lines geometry (hidden lines)

get void cut

import clr
import sys
import System
from Autodesk.DesignScript.Geometry import *
import Autodesk.DesignScript.Geometry as DS

import Autodesk
from Autodesk.Revit.DB import *
import Autodesk.Revit.DB as DB

import Revit

import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument

pf_path = System.Environment.GetFolderPath(System.Environment.SpecialFolder.ProgramFilesX86)
sys.path.append('%sIronPython 2.7Lib' % pf_path)
import itertools
def get_CutLinesDoor(e):
	lines = []
	opt = Options()
	opt.IncludeNonVisibleObjects = True
	geoSet = e.get_Geometry(opt)
	for g in geoSet:
		if isinstance(g, GeometryInstance):
			for gi in g.GetInstanceGeometry():
				if isinstance(gi, Line):
					if gi.GraphicsStyleId == ElementId.InvalidElementId:
						# get horizontal Lines
						vect = gi.ComputeDerivatives(0.5, True).BasisX
						if abs(vect.Z) < 0.001:
	return lines

e = UnwrapElement(IN[0])
out = []

cutLines = get_CutLinesDoor(e)
cutLines.sort(key = lambda x : x.StartPoint.Z, reverse = True)

for idx, (key_, group) in enumerate(itertools.groupby(cutLines, key = lambda x : x.StartPoint.Z)):
	if idx == 0:
		top = key_
		top_loopCurve = DS.PolyCurve.ByJoinedCurves([x for x in group])
		bottom = key_
		DSSolid = DS.Curve.ExtrudeAsSolid(top_loopCurve, Vector.ByCoordinates(0,0,-1), abs(top - bottom))
OUT = out