FamilyInstance.ByGeometry not working in Revit 2022

Thanks for the tag @GavinCrump

I knew this issue will start affecting many people by time…

How should I start…

Well, basically a decision was made to remove an old branch of code (document.import) and replace it with (ShapeImporter) code…

Benefits & Consequences ? well, better Revit performance, consistent import units… but LIMITED range of importable geometry…

Why ? well, the old branch of code did lots of healing and fixing to the geometry prior imporintg it, but has resulted (sometimes) in an undesirable performance impact.

What is healing ? well, basically, the source of troubles in Revit is it’s small geometrical tolerance, around 0.07mm … when a geometry has a surface that has an edge, of this dimension… and that edge is stitched to another one… it cannot simply import it… (Many other complex situations as well)
So healing is basically detecting those errors and re-creating the surfaces and stitching them on the fly…
Healing has so many techniques… (Mentioned later in the post)

Now after Autodesk removed that old branch of code, we can no longer import the wide range of geometry that we could through the API as before…

*Even if you imported (many) forms in older Revit versions, and opened them in 2022, they will disappear, or behave strangely… etc

I tried a lot to convince Revit team by undo of what they did until they make the new code (healable to imported geometry) and has the ability to import same wide range of geometry… but what’s made has been made… and Autodesk is… well Autodesk…

Anyways, to solve your issue, and hopefully many others.
You may try to use the node called “K-Family Import” from Synthesize toolkit package…

I implemented ALL possible healing methods in Dynamo to help fix the geometry prior importing it to Revit…

I tried your SAT file… and it worked, but there’s a catch…
I CANNO GAURENTEE THAT IT STAYS SOLID

When geometry is healed, (Surfaces are re-created) it is not guaranteed that they actually stitch together back into a proper solid… so it depends…

Autodesk’s old code was able to stitch them back into Solids, but in the cost of making Revit somehow ignoring the issues… which of course caused performance problems.

But I really recommend using it within the package to have your inputs ready.

There’s also in extra folder dyn file called Family.SAT Sync… it uses K-Family Insert in a very user-friendly way… that allows you to do a refreshable imports…etc

Code snippets in the following posts, there is a character limit…

Here are some images during the journey of studying this behavior…
You can clearly see after healing, or “Laundering” the geometry in Dynamo… I can get it inside.

4 Likes