Create beams on reference planes

Hi there,
I’m trying to create beams from lines in Revit through Dynamo and everything goes fine until I want to place lines on Levels but when it comes to place them on reference planes I have an issue.
I created the Dynamo graph below (I also attach the dyn file due to poor visual since graph is large).
CreateBeamFromLines.dyn (51.3 KB)


I managed to tweak the line workplane by hard setting its value to a Level name in order to get all my beams created and now I thought I might set the beam instance parameter “Work Plane” back to the value in which the original line was lying.
When I try to set this parameter though I get an error since the parameter is not available in such beam instance.
I attach a few screenshots: once all the beams are created I see from Revit that the parameter is missing from the list, but as soon as I set the work plane by clicking the Edit Work Plane button it appears.
Any chance to get it working?
Thanks in advance.
CreateBeamFromLines_Issue.pdf (503.4 KB)

Edit: attached also the sample Revit file provaTraviPP_Copy.rvt (1.8 MB)

try with this one.

That’s the method I was using…but it wants a level as input

Hi Paolo,

It’s possible to place elements on Reference planes but it’s not possible for beams.
Here is an example :

The family must be Work Plane-Based.

1 Like

Hi Alban, thank you for your contribute.
Just one question to be sure I got this straight from your words.
If your comment is that in general (read as a category) beams cannot be put on work planes programmatically, then my question is why when the same can be achieved manually in Revit.
Otherwise if your comment applies to my particular beam family i’m using, then i’m perplexed the same since i managed to set the beam on a workplane in Revit as shown in the pdf file i attached in the first post, so I believe the property work plane-based in the family was flagged.

Thanks again.

As far as I know Paolo, beams are created in only one way with the revit API: curve, level, family type and structural type (beam, joist, etc).
As you can see, workplane or references are not required, because it create the beam in 3d, like you can do manually, with pick line and 3d toggle on. So, you cannot create on the plane you want, maybe you can switch later to it, after creation

Hi Fabio, thank you.
That was exactly the topic I was asking: I hard pushed the beam on a level and then I’m trying to switch its workplane on my reference plane but I get error because such property is missing in my Revit beam. The “odd” behavoiur is that in revit is possible to manually edit workplane and via dynamo i can’t find a way.

Hi Paolo,

The Revit API doesn’t reflect everything possible in Revit.
As far I know, it’s not possible to create beams on workplanes, it is however possible to create beams at a defined height.
Your best bet is to submit a suggestion on the Revit Ideas forum to open this functionality in the API.

Thank you Alban! I will.
Have a nice day

I believe that if the beam is drawn in the UI with one of those work planes in the method you describe in the UI it still reports a level. Drawing such a beam in a 3D view will likely confirm.

The API allows this same thing: define the line on a work plane, set that as the curve, set a level, and set a type.