Hello,
I have a floor on which a familyinstance is inserted on the face of the floor (the instance to host: the floor). I checked in the family the "Cut with Void When Loaded" parameter so that the void created on the floor. I want to retrieve the instance that creates the void in the floor.
I did some research, and found this link: http: //thebuildingcoder.typepad.com/blog/2011/06/boolean-operations-and-instancevoidcututils.html But when I use InstanceVoidCutUtils.GetCuttingVoidInstances(element) returns an empty list.
Solved! Go to Solution.
Solved by FAIR59. Go to Solution.
This discussion should provide hints to all you need:
I hope it helps.
Please let us know how it goes and how you end up resolving this.
Thank you!
Cheers,
Jeremy
lsdlfs
I want to deduce the voids in the floor. But when I use ElementIntersectsElementFilter or ElementIntersectsSolidFilter, I do not have the expected result (no elements intersect).
First case : area = 607.558m2 and Volume = 243.023m3
Second case : area = 607.558m2 and Volume = 243.023m3
Family parameter
FamilyInstance cutting
Solid solid = floor.get_Geometry(new Options())
.OfType<Solid>() .Where<Solid>(s => null != s && !s.Edges.IsEmpty) .FirstOrDefault(); FilteredElementCollector intersectingInstances = new FilteredElementCollector(doc) .OfClass(typeof(FamilyInstance)) .WherePasses(new ElementIntersectsSolidFilter(solid)); int n1 = intersectingInstances.Count<Element>(); intersectingInstances = new FilteredElementCollector(doc) .OfClass(typeof(FamilyInstance)) .WherePasses(new ElementIntersectsElementFilter(floor)); int n = intersectingInstances.Count<Element>();
Here "n" and "n1" are equal to 0.
I have done some tests and here are my returns.
FindInserts returns FI_1 even if its host (Level 3) is not the floor. Its good.I think we can say that the problem is solved.
Thank you FAIR59 ;).
Many thanks yet again to Fair59 for his accurate and succinct solution, and to Axel for raising the issue and confirming it!
Once again, I think this needs to be preserved and easily found, so I edited and shared on The Building Coder:
Cheers,
Jeremy
Can't find what you're looking for? Ask the community or share your knowledge.