Create Mass from revit element

Hello,
My purpose is to create mass from the selected revit element, and create the revit roof by face.
I did get the surface from that element. Now to convert to mass I used the node- Directshape.ByGeometry. It does create element in mass category. But when I use Roof by face in revit, it does not select the face.

I have tried the different node - FamilyInstance.ByGeometry, but it gives the error, which I don’t understand.

Third approach, I tried is to use ImportInstance.ByGeometry. so creating fimily and load into project. But for that I need to run dynamo in mass family environment. But my initial input (select model element) is in revit project. I have not been able to figure out how to work that.

FYI, My project is in Revit 2020.
Any help would be appreciated. Thanks!


Hi,
If you open the family, can you change it’s Category to be a Mass family, and save it with a new name?

Hi Marcel, thanks for the reply.

Are you talking about my initial input?
Actually, the initial input is not a family, it is roof element.

The code block defining the family name is probably returning null since it needs an input. Put the “A1” in quotations and see if that clears the error.

2 Likes

ohh yes. thank you! it does solve issue. It was my silly mistake :sweat_smile:.now I can select the face.

But In revit, it gives error : Can’t make roof. Maybe due to its geometry ? Any ideas?

Yeah, those little things trip me up sometime also. :slight_smile:

Could be the complex shape, but I haven’t messed with something like that, so not certain.

In the Error dialog click expand, is there more information there?

It does not say much, just “can’t make a roof”.

This is the first problem. You’re using a Revit build which isn’t supported, and doing conceptual work (the massing) which indicates that the project is early in the design process not just wrapping up something that is in CA. There are two issues with this that you, the project management team, consultants and owner need to be aware of.

  1. If your model goes corrupt (say you get the Too Many Missing Elements error which was fairly common in 2020), it will take longer to get it recovered by my colleagues in support, if it can be recovered at all.
  2. You’re also missing updates for both new functionality (sure why not), but also security patches (ie: the Log4J which impacted Revit about a year ago) which are issues from here on out won’t be applied to 2020, so everyone using that build is putting the organization at risk.

Assuming you’ve read that and have decided to either bet the project success on not having any problems with the above or have upgraded… This is likely due to the extreme shape edits causing problems with the roof creation engine. Splitting the initial surface into segements using isocurves is one thought that comes to mind to resolve this, but we’d need the .rvt containing just the element which you’ve used to build the geometry, and your .dyn to this point in order to help.

1 Like

Hi jacob. Thanks for your time to give the detailed reply. While I do understand the issue regarding using 2020. owner/client does not want to upgrade the version, as other discipline model are in Revit 2020,too.

I will try your suggestion about spiting surface.
Also, I am attaching the dynamo graph and revit sample file containing the roof element.
Samply-Roof-Fordynamo.rvt (4.9 MB)
Create Mass from Element surface.dyn (26.8 KB)

  1. From the project file, select the element geometry you’d like to use as reference and use SerializeAsSAB and export the output to a csv file


    (Selected only one surface in this example)

  2. Open a mass family file and DeserializeFromSAB to get the geometry into the family environment

  3. Import the mass family into the project file and create roof by face

3 Likes

Hi, Thank you for the solution in family environment. It works.

But now my problem is creating roof by face in revit. I am trying to split the surface, if it can work.

Also, I have noticed now, that the surface I created by dynamo, does not exact match with element surface.

I have initially tried used OOTB node element.geometry, it gave empty list. then I used element.location+, only by that i could get some curves. But also, the surface created from that did not exactly match. any ideas how i can get exact geometry from that element?

(I have modified graph, to directly get polycurve from nurbcurves, i found that i did not need all those node).


Perhaps select face?

Is the original face curved or straight on that edge? Is the Dynamo edge curved or straight? What’s the discrepancy between the two?

1 Like

Hi, Selecting face worked. I didn’t need to extract geometry. Somehow by this mass, revit can create a Roof. Thank you! :smile:

Dynamo and Revit use two different geometry engines. As a result, Dynamo is capable of making geometry with particular parts which Revit does not permit for native elements. Revit does however have a rather advanced importer which is what is being used for most Family/DirectShape/Form creation methods as it ‘gets the most accurate shape as we had it in Dynamo’, however this can limit the functional uses of that shape.

Hope this helps explain the why. Glad you’re sorted either way!

1 Like

Hello, on a related note, I have created a script that creates masses from Revit elements and then just names them the same as the element ID so it is unique. The one issue I have is with curved elements. It doesn’t work at all with anything that is not straight. I’ve tried to use the nodes I see this is this post and can’t get it to work. Do you know what I could possibly add to this to make it work with curves?

Script that works fine with straight elements shown below:

What isn’t working about it?

In my example, I have multiple ceilings placed in my model that I want to create masses from. Some are rectangular and some are ovals. The ovals make the script fail because they can’t generate a mass. From the rabbit hole that I’ve been down, it looks like there are polysurface nodes that need to be used with curved Revit elements?

Thanks-

Hi, what is the underlying objective of this procedure (transform an existing geometry that we already have?), something escapes me, curiosity is a nasty fault, I know
thanks in advance
Sincerely
christian.stan