# Create Mass from revit element

**URL:** <https://forum.dynamobim.com/t/create-mass-from-revit-element/91157>\
**Category:** Revit\
**Tags:** geometry\
**Created:** [June 26, 2023, 11:16am UTC](https://forum.dynamobim.com/t/create-mass-from-revit-element/91157 "2023-06-26T11:16:10Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![bhoomi.patel](https://avatars.discourse-cdn.com/v4/letter/b/d78d45/32.png) [@bhoomi.patel](https://forum.dynamobim.com/u/bhoomi.patel)\
**Post date:** [June 26, 2023, 11:16am UTC](https://forum.dynamobim.com/t/create-mass-from-revit-element/91157/1 "2023-06-26T11:16:10Z")

</div>

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!

 ![Mass_2023-06-26_04-33-14](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/1/e143ac79323b3d76d7c7a7ebd7f26c2450d6ec6d.png)  
 ![Mass_revitImage](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/5/f5ed2afdf71144f4f66f68e94050a5cc0cd1cc80.png)

---

<div class="post-metadata">

**Author:** ![Marcel\_Rijsmus](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/marcel_rijsmus/32/8539_2.png) [@Marcel\_Rijsmus](https://forum.dynamobim.com/u/Marcel_Rijsmus)\
**Post date:** [June 26, 2023, 12:07pm UTC](https://forum.dynamobim.com/t/create-mass-from-revit-element/91157/2 "2023-06-26T12:07:22Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![bhoomi.patel](https://avatars.discourse-cdn.com/v4/letter/b/d78d45/32.png) [@bhoomi.patel](https://forum.dynamobim.com/u/bhoomi.patel)\
**Post date:** [June 26, 2023, 12:20pm UTC](https://forum.dynamobim.com/t/create-mass-from-revit-element/91157/3 "2023-06-26T12:20:34Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![staylor](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/staylor/32/94307_2.png) [@staylor](https://forum.dynamobim.com/u/staylor)\
**Post date:** [June 26, 2023, 12:28pm UTC](https://forum.dynamobim.com/t/create-mass-from-revit-element/91157/4 "2023-06-26T12:28:23Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![bhoomi.patel](https://avatars.discourse-cdn.com/v4/letter/b/d78d45/32.png) [@bhoomi.patel](https://forum.dynamobim.com/u/bhoomi.patel)\
**Post date:** [June 26, 2023, 12:40pm UTC](https://forum.dynamobim.com/t/create-mass-from-revit-element/91157/5 "2023-06-26T12:40:07Z")

</div>

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

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

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/5/b5404863ece6e612d1f8e6695815a66dd88f460c.png)

---

<div class="post-metadata">

**Author:** ![staylor](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/staylor/32/94307_2.png) [@staylor](https://forum.dynamobim.com/u/staylor)\
**Post date:** [June 26, 2023, 12:54pm UTC](https://forum.dynamobim.com/t/create-mass-from-revit-element/91157/6 "2023-06-26T12:54:44Z")

</div>

Yeah, those little things trip me up sometime also. 🙂

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

---

<div class="post-metadata">

**Author:** ![Marcel\_Rijsmus](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/marcel_rijsmus/32/8539_2.png) [@Marcel\_Rijsmus](https://forum.dynamobim.com/u/Marcel_Rijsmus)\
**Post date:** [June 26, 2023, 12:56pm UTC](https://forum.dynamobim.com/t/create-mass-from-revit-element/91157/7 "2023-06-26T12:56:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![bhoomi.patel](https://avatars.discourse-cdn.com/v4/letter/b/d78d45/32.png) [@bhoomi.patel](https://forum.dynamobim.com/u/bhoomi.patel)\
**Post date:** [June 26, 2023, 1:20pm UTC](https://forum.dynamobim.com/t/create-mass-from-revit-element/91157/8 "2023-06-26T13:20:31Z")

</div>

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

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/a/5a6bc060d1d8b899b8924e51ea9c267739d43ba3.png)

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [June 26, 2023, 1:25pm UTC](https://forum.dynamobim.com/t/create-mass-from-revit-element/91157/9 "2023-06-26T13:25:45Z")

</div>

> [@bhoomi.patel](#):
>
> FYI, My project is in Revit 2020.

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.

---

<div class="post-metadata">

**Author:** ![bhoomi.patel](https://avatars.discourse-cdn.com/v4/letter/b/d78d45/32.png) [@bhoomi.patel](https://forum.dynamobim.com/u/bhoomi.patel)\
**Post date:** [June 26, 2023, 1:45pm UTC](https://forum.dynamobim.com/t/create-mass-from-revit-element/91157/10 "2023-06-26T13:45:17Z")

</div>

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](https://forum.dynamobim.com/uploads/short-url/gN4vWoIjWyU7Wp9qYcWtDMkob6w.rvt) (4.9 MB)  
[Create Mass from Element surface.dyn](https://forum.dynamobim.com/uploads/short-url/t2r7K2na2s5fZhp6c6RiLGVqrZS.dyn) (26.8 KB)

---

<div class="post-metadata">

**Author:** ![Vikram\_Subbaiah](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vikram_subbaiah/32/50797_2.png) [@Vikram\_Subbaiah](https://forum.dynamobim.com/u/Vikram_Subbaiah)\
**Post date:** [June 26, 2023, 3:48pm UTC](https://forum.dynamobim.com/t/create-mass-from-revit-element/91157/11 "2023-06-26T15:48:22Z")

</div>

> [@bhoomi.patel](#):
>
> 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.

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  

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

---

<div class="post-metadata">

**Author:** ![bhoomi.patel](https://avatars.discourse-cdn.com/v4/letter/b/d78d45/32.png) [@bhoomi.patel](https://forum.dynamobim.com/u/bhoomi.patel)\
**Post date:** [June 27, 2023, 6:46am UTC](https://forum.dynamobim.com/t/create-mass-from-revit-element/91157/12 "2023-06-27T06:46:01Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![bhoomi.patel](https://avatars.discourse-cdn.com/v4/letter/b/d78d45/32.png) [@bhoomi.patel](https://forum.dynamobim.com/u/bhoomi.patel)\
**Post date:** [June 27, 2023, 7:34am UTC](https://forum.dynamobim.com/t/create-mass-from-revit-element/91157/13 "2023-06-27T07:34:37Z")

</div>

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).

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/b/abf937cc181987d7531fa07f1fd00616452d2f5e.png)  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/b/4b5222b22dd74a0cce6a5d2fd86e84d764c36b6f.png)

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [June 27, 2023, 7:37am UTC](https://forum.dynamobim.com/t/create-mass-from-revit-element/91157/14 "2023-06-27T07:37:27Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![bhoomi.patel](https://avatars.discourse-cdn.com/v4/letter/b/d78d45/32.png) [@bhoomi.patel](https://forum.dynamobim.com/u/bhoomi.patel)\
**Post date:** [June 27, 2023, 8:47am UTC](https://forum.dynamobim.com/t/create-mass-from-revit-element/91157/15 "2023-06-27T08:47:18Z")

</div>

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

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/6/86d96c393a187bea267a70c51e8b1dc7f5218fe6.png)

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [June 27, 2023, 9:12am UTC](https://forum.dynamobim.com/t/create-mass-from-revit-element/91157/16 "2023-06-27T09:12:54Z")

</div>

> [@bhoomi.patel](#):
>
> Somehow by this mass, revit can create a Roof. Thank you! 😄

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!

---

<div class="post-metadata">

**Author:** ![mschiltz](https://avatars.discourse-cdn.com/v4/letter/m/958977/32.png) [@mschiltz](https://forum.dynamobim.com/u/mschiltz)\
**Post date:** [February 14, 2024, 7:22pm UTC](https://forum.dynamobim.com/t/create-mass-from-revit-element/91157/17 "2024-02-14T19:22:35Z")

</div>

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:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/7/a7692acc8a6a5eb92fb840613e3f69971b0b7372.png)

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [February 14, 2024, 7:24pm UTC](https://forum.dynamobim.com/t/create-mass-from-revit-element/91157/18 "2024-02-14T19:24:44Z")

</div>

What isn’t working about it?

---

<div class="post-metadata">

**Author:** ![mschiltz](https://avatars.discourse-cdn.com/v4/letter/m/958977/32.png) [@mschiltz](https://forum.dynamobim.com/u/mschiltz)\
**Post date:** [February 14, 2024, 7:29pm UTC](https://forum.dynamobim.com/t/create-mass-from-revit-element/91157/19 "2024-02-14T19:29:51Z")

</div>

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-

---

<div class="post-metadata">

**Author:** ![christian.stan](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/christian.stan/32/166296_2.png) [@christian.stan](https://forum.dynamobim.com/u/christian.stan)\
**Post date:** [February 14, 2024, 7:36pm UTC](https://forum.dynamobim.com/t/create-mass-from-revit-element/91157/20 "2024-02-14T19:36:19Z")

</div>

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

[Next page](https://forum.dynamobim.com/t/create-mass-from-revit-element/91157.md?page=2)
