# Create spaces automatically

**URL:** <https://forum.dynamobim.com/t/create-spaces-automatically/1020>\
**Category:** Packages\
**Created:** [February 3, 2015, 9:42pm UTC](https://forum.dynamobim.com/t/create-spaces-automatically/1020 "2015-02-03T21:42:05Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dino\_Deijzen\_Van](https://avatars.discourse-cdn.com/v4/letter/d/9fc348/32.png) [@Dino\_Deijzen\_Van](https://forum.dynamobim.com/u/Dino_Deijzen_Van)\
**Post date:** [February 3, 2015, 9:42pm UTC](https://forum.dynamobim.com/t/create-spaces-automatically/1020/1 "2015-02-03T21:42:05Z")

</div>

Dear team,

is there a method to place spaces within Dynamo on the locations that has rooms, or alternatively (and more ideally) at wall bounded areas as Revit does (see bellow picture).

This is one of the tedious processes that seems to be a ideal job for Dynamo to tackle. Sadly i have no initial dynamo setup as i am unaware how to start on this (other then listing all the rooms available)

&nbsp;

![spaces](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/2X/f/fea409a06fb36cb86642b0a26e2da076584ff730.png)

---

<div class="post-metadata">

**Author:** ![Dino\_Deijzen\_Van](https://avatars.discourse-cdn.com/v4/letter/d/9fc348/32.png) [@Dino\_Deijzen\_Van](https://forum.dynamobim.com/u/Dino_Deijzen_Van)\
**Post date:** [February 6, 2015, 2:50am UTC](https://forum.dynamobim.com/t/create-spaces-automatically/1020/2 "2015-02-06T02:50:21Z")

</div>

Hi team.

I would be helped if an idea can be shared on the above case ( else i have nothing to do this weekend 🙂 )

Clarity if it is or isn’t possible at this moment in time would be helpfull as well.

&nbsp;

wr Dino

&nbsp;

---

<div class="post-metadata">

**Author:** ![Dino\_Deijzen\_Van](https://avatars.discourse-cdn.com/v4/letter/d/9fc348/32.png) [@Dino\_Deijzen\_Van](https://forum.dynamobim.com/u/Dino_Deijzen_Van)\
**Post date:** [February 16, 2015, 7:58pm UTC](https://forum.dynamobim.com/t/create-spaces-automatically/1020/3 "2015-02-16T19:58:27Z")

</div>

I have performed an initial try, though i have trouble creating the logic with the available nodes…

Advice would be helpful. goal is to generate spaces automatically ( in this case from already existing rooms)

![spaces from rooms](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/2X/d/d9ff7b1984bc84faa8400966b02d94b52de2927a.png)

---

<div class="post-metadata">

**Author:** ![Dino\_Deijzen\_Van](https://avatars.discourse-cdn.com/v4/letter/d/9fc348/32.png) [@Dino\_Deijzen\_Van](https://forum.dynamobim.com/u/Dino_Deijzen_Van)\
**Post date:** [February 26, 2015, 2:08am UTC](https://forum.dynamobim.com/t/create-spaces-automatically/1020/4 "2015-02-26T02:08:42Z")

</div>

Dear team,

i am stuck with placing spaces . I managed to steal some code from a previous post and adjust it to create spaces.

Ideally i would use the locations x,y,& Z instead of the level input, in order to place all spaces within the project… Fiddling around with the code did not work so far.

setup:

&nbsp;

![spacer](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/2X/5/56d732f1cf5d99d60989456dd7f15b3ea3668f42.png)

&nbsp;

&nbsp;

&nbsp;

&nbsp;

&nbsp;

i tried to adjust:

for item in uvs:  
uv=UV(item.X,item.Y)—\> uv=UV(item.X,item.Y,item.Z) …+ adjusting the code further

or

levels=level[i] …+ adjusting the code further

&nbsp;

seems no fruitful approach, help would be appreciated

---

<div class="post-metadata">

**Author:** ![Dimitar\_Venkov](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/dimitar_venkov/32/2068_2.png) [@Dimitar\_Venkov](https://forum.dynamobim.com/u/Dimitar_Venkov)\
**Post date:** [February 26, 2015, 9:44am UTC](https://forum.dynamobim.com/t/create-spaces-automatically/1020/5 "2015-02-26T09:44:45Z")

</div>

Hi Dino,

You seem to be almost there. I’m not very experienced with the MEP part of Revit and I hope I’m not steering you wrong with the following:

![Dino](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/2X/1/15db71ce4cf0df3b56b94328227e74d2d27ab4ec.jpg)

The Element.Level is from the extremely useful clockwork package and will give you the level of each room.

---

<div class="post-metadata">

**Author:** ![Dino\_Deijzen\_Van](https://avatars.discourse-cdn.com/v4/letter/d/9fc348/32.png) [@Dino\_Deijzen\_Van](https://forum.dynamobim.com/u/Dino_Deijzen_Van)\
**Post date:** [February 26, 2015, 8:37pm UTC](https://forum.dynamobim.com/t/create-spaces-automatically/1020/6 "2015-02-26T20:37:41Z")

</div>

Dimitar,

This is of great help, it solved the puzzle.

Seems i need to make work of Revit’s API logic to get a confident feeling on using Dynamo to its real potential.

Again, thank you for the effort in helping me further.

---

<div class="post-metadata">

**Author:** ![Joseph\_Peel](https://avatars.discourse-cdn.com/v4/letter/j/ce73a5/32.png) [@Joseph\_Peel](https://forum.dynamobim.com/u/Joseph_Peel)\
**Post date:** [March 1, 2015, 3:47pm UTC](https://forum.dynamobim.com/t/create-spaces-automatically/1020/7 "2015-03-01T15:47:01Z")

</div>

Dino,

I am trying to do something similar and also modified the rooms node.

Does placing spaces by Z coordinate work? Do they pick up the associated level automatically? Seems to be quite fundamental to how spaces work.

---

<div class="post-metadata">

**Author:** ![Dino\_Deijzen\_Van](https://avatars.discourse-cdn.com/v4/letter/d/9fc348/32.png) [@Dino\_Deijzen\_Van](https://forum.dynamobim.com/u/Dino_Deijzen_Van)\
**Post date:** [March 1, 2015, 10:55pm UTC](https://forum.dynamobim.com/t/create-spaces-automatically/1020/8 "2015-03-01T22:55:00Z")

</div>

Hi Joseph,

Afraid i am not much of help on this. using a direct z- coordinate did not work for me (yet).

For now, you might have to convert your z-axis values to levels in order to correctly place the spaces if your parameters consists of the x,y&z location of your desired space.

This allows you to make use of Dimitar’s approach.

&nbsp;

---

<div class="post-metadata">

**Author:** ![daniel\_nielsen](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/daniel_nielsen/32/25132_2.png) [@daniel\_nielsen](https://forum.dynamobim.com/u/daniel_nielsen)\
**Post date:** [November 28, 2015, 3:39pm UTC](https://forum.dynamobim.com/t/create-spaces-automatically/1020/9 "2015-11-28T15:39:27Z")

</div>

I have tried this workflow/Python script without luck. Is it because some changes in the Dynamo/Revit API?

I would really like to automate the creation of Spaces based on Rooms.

Thanks! 🙂

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [November 28, 2015, 10:10pm UTC](https://forum.dynamobim.com/t/create-spaces-automatically/1020/10 "2015-11-28T22:10:31Z")

</div>

Hi Daniel,

Which version of Revit your using? If your using Revit 2016 have a look at this changes in API [http://thebuildingcoder.typepad.com/blog/2015/04/whats-new-in-the-revit-2016-api.html](http://thebuildingcoder.typepad.com/blog/2015/04/whats-new-in-the-revit-2016-api.html)

&nbsp;

---

<div class="post-metadata">

**Author:** ![daniel\_nielsen](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/daniel_nielsen/32/25132_2.png) [@daniel\_nielsen](https://forum.dynamobim.com/u/daniel_nielsen)\
**Post date:** [November 29, 2015, 6:17am UTC](https://forum.dynamobim.com/t/create-spaces-automatically/1020/11 "2015-11-29T06:17:19Z")

</div>

Damm it… my mistake… a spelling mistake 😉 Dont do it to late then you will make mistakes… 😉

Her is the script if anyone like to try it:

> **[placeSpaces\_fromRooms.dyn](https://www.dropbox.com/s/et560hveew85kft/placeSpaces_fromRooms.dyn?dl=0)**
>
> Shared with Dropbox
