Here is a way to share Dynamo generated geometry without having to share code
Irrelevant to Revit workflows though.
Geometry is converted to serialized binary stream data using Geometry.SerializeAsSAB and saved to an external file.
Generated geometry could be shared without having to share code.
For example, a designer could share a pattern (with no flexible parameters) without having to share the code that generates it.
This could potentially be incorporated into a workflow that generates Revit elements.
Code for this pattern had been posted here. Hiding nothing