# Need help dividing existing Parts into more parts

**URL:** https://forum.dynamobim.com/t/need-help-dividing-existing-parts-into-more-parts/83221
**Category:** Revit
**Tags:** python, dynamo, parts
**Created:** [November 17, 2022, 6:42pm UTC](https://forum.dynamobim.com/t/need-help-dividing-existing-parts-into-more-parts/83221 "2022-11-17T18:42:31Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![ASikes](https://avatars.discourse-cdn.com/v4/letter/a/a9a28c/32.png) [@ASikes](https://forum.dynamobim.com/u/ASikes)
#### Post date: [November 17, 2022, 6:42pm UTC](https://forum.dynamobim.com/t/need-help-dividing-existing-parts-into-more-parts/83221/1 "2022-11-17T18:42:32Z")

</div>

Hello! New Dynamo user here. I took the existing code from here ([Dividing parts with dynamo - #36 by JacobSmall](https://forum.dynamobim.com/t/dividing-parts-with-dynamo/5388/36)) and modified it a bit to suit my needs. The problem I’m running into now is that I need to select an existing Part instead of an existing Wall. I changed the dynamo part of it to do what I need, but I’m getting stuck on what to do with the Python Script.

It keeps giving me the error:  
“Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed.  
Traceback (most recent call last):  
File “”, line 23, in   
TypeError: iteration over non-sequence of type NoneType”

I know it has something to do with the script calling for a wall but I’m not sure where the edits need to take place. I can get the lines to divide the parts where I need but it fails dividing it.

here is the .dyn:

> **[Divide Wall Parts.dyn](https://www.dropbox.com/s/jvgfmd7mndmbd4z/Divide%20Wall%20Parts.dyn?dl=0)**
>
> Shared with Dropbox

Any help would be appreciated! Thanks.

---

<div class="post-metadata">

### Author: ![EddieSaez](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/eddiesaez/32/154542_2.png) [@EddieSaez](https://forum.dynamobim.com/u/EddieSaez)
#### Post date: [January 30, 2023, 5:52am UTC](https://forum.dynamobim.com/t/need-help-dividing-existing-parts-into-more-parts/83221/2 "2023-01-30T05:52:36Z")

</div>

Have you resolved this?

---

<div class="post-metadata">

### Author: ![ASikes](https://avatars.discourse-cdn.com/v4/letter/a/a9a28c/32.png) [@ASikes](https://forum.dynamobim.com/u/ASikes)
#### Post date: [January 31, 2023, 1:35pm UTC](https://forum.dynamobim.com/t/need-help-dividing-existing-parts-into-more-parts/83221/3 "2023-01-31T13:35:44Z")

</div>

I have not! Deadlines came up and I had to stop working on it but I would still like to resolve it

---

<div class="post-metadata">

### Author: ![EddieSaez](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/eddiesaez/32/154542_2.png) [@EddieSaez](https://forum.dynamobim.com/u/EddieSaez)
#### Post date: [January 31, 2023, 10:49pm UTC](https://forum.dynamobim.com/t/need-help-dividing-existing-parts-into-more-parts/83221/4 "2023-01-31T22:49:50Z")

</div>

Have seen this post?

> [@Revit not regenerating view after creating parts](https://forum.dynamobim.com/t/revit-not-regenerating-view-after-creating-parts/32927):
>
> Hello, I am experimenting with diving walls into parts using the amazing script create by Einar on this post: The problem is, after a successful run of the scrip, Revit does not regenerate its view, so I can’t see or interact with the created parts using Revit. [image] But if I manually create parts from another element, it immediately updates the previous elements and then I can see the parts. [image] Is there a way to “refresh” the view and have the expected result in the script? I am u…
