Element.geomertry giving null

i am trying to do a raybounce… but it doesn’t find all elements some how…
i have good results if i get the element.geometry, but when i feed it the whole list i get a null
with the error message
element.geometry one or more geometries have failed to convert due to this error value can not be null.
Why is it always so difficult to get objects that are in Revit to get it into dynamo…

Most geometry isn’t an issue, so ‘always’ is a bit of an exaggeration, no? :wink:

As to why, you can think of the structure of geometry as a language which various programs speak. Some programs speak the same language, AutoCAD and Civil 3D as an example. Other programs have languages which partially align, such as AutoCAD and Dynamo. But other programs have completely different languages, such as Revit and Dynamo. For the purposes of this exercise let’s consider Revit’s as speaking English, and Dynamo as speaking Swedish.

A point in Revit is a punkt in Dynamo. Pretty straight forward. But a line in Revit is either a linje, a streck, kurva or a lina in Dynamo depending on the context. And if you go the other direction a linje might return a curve or a line… They all mean basically the same thing, but the specifics matter in the context thereof, and so when you assemble everything it may or may not go back together correctly.

Moving back into the ‘functional’ aspects of this problem; Dynamo has a rather robust set of tools for pulling the most specific and accurate geometry possible without a significant performance hit that would make the application non-functional. You can review them yourself here: https://github.com/DynamoDS/DynamoRevit/tree/master/src/Libraries/RevitNodes/GeometryConversion. These handle most uses without issue, but edge cases and outliers certainly wont’ work in all cases. Usually these are cases with very small or very larger geometric tolerances. If I recall than small means less than 0.000001 internal Revit units (or 1/5 of a mitochondrion) and large means greater than 22 miles (or 2/5 of the length of the panama canal). These get especially nasty when combined, as is of the the case with imports. Speaking of imports, Revit geometry was formed in ways which don’t conform to the Revit standard also has some issues.

And so seeing the name of the families in use, My guess is that you’re suffering from a combination of imports and small geometry, but I can’t confirm without the file. There are packages out there (Synthesize Toolkit) which have slower performing geometry conversion tools to allow for pulling stuff across that might help, but the slower aspect should be taken into account.

You might want to try drawing a line from the initial in the direction of the desired ray-cast for a distance of 100 feet, section it in a 3D view, purge all the rest of the project besides a ‘failing’ result, and post that file for review.