Hey Rob,
Thanks for elaborating on this and for sharing the stream with me! Super helpful for me to understand the situation here.
I think I see the problem; you are trying to do two different things here. There are two options I suppose for creating a speckle object that will be received in Revit as a beam:
- Create a
RevitBeam
object (this is what the Revit connector does) - Create a
Line
object and add aSpeckleSchema
property containing aBeam
object so Revit knows that this line is in fact a beam (this is what the Rhino / GH connectors do)
These are not equivalent and you’ll need to decide which one you want to go with from Python. (1) involves creating a RevitBeam
class in python and populating that to create your beams. (2) involves simply attaching a @SpeckleSchema
property (note the @
as it’s detached) to any existing geometry object to create your beams.
If you are getting a “Unit System is unsupported” error, that’s probably because something that should have units is missing it. From the error, it looks like you’re missing units on the points.
I’ve created two commits to demonstrate how data should be structured which I’ve embedded below. Hopefully, opening them up and seeing the structure will make it clear!
Here you see option 1 from this commit:
and here is option 2 from this commit:
Both produce the following result when receiving in Revit:
NOTE: Beam
and RevitBeam
will both be received successfully in Revit. Revit creates RevitBeam
s and Rhino/GH BIM create Beam
s. The difference between the two is that the RevitBeam
has additional Revit specific properties.
Hopefully that clears it up. If you’re still unsure, please keep firing away with the questions! This topic could def be written up in a tutorial or something so I’ll add that to my list. Thanks for bringing it up!