# Python multiple input instead of single input

**URL:** <https://forum.dynamobim.com/t/python-multiple-input-instead-of-single-input/26932>\
**Category:** Revit\
**Created:** [October 8, 2018, 4:30am UTC](https://forum.dynamobim.com/t/python-multiple-input-instead-of-single-input/26932 "2018-10-08T04:30:17Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arsany123](https://avatars.discourse-cdn.com/v4/letter/a/9e8a1a/32.png) [@Arsany123](https://forum.dynamobim.com/u/Arsany123)\
**Post date:** [October 8, 2018, 4:30am UTC](https://forum.dynamobim.com/t/python-multiple-input-instead-of-single-input/26932/1 "2018-10-08T04:30:17Z")

</div>

this dynamo script is from node “copy elements from view to view” but the problem it is reading only single input which is one source view and one destination view. i would like to read list of source views and list of destination views.  
i really need your help .  
thanks a lot

 ![1](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/b/ab9a7e1e7b65f10030fda346110ad5901d81fd9d.jpeg) ![3](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/5/6540250dec34e9491b1ac641a1d24face55cf2b0.jpeg) ![2](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/b/6b88234f579cf9b2a1db0a5309b49c06eec84c8c.jpeg)

#Based on a node originally from Dimitar Venkov  
import clr

clr.AddReference("RevitServices")  
import RevitServices  
from RevitServices.Persistence import DocumentManager  
from RevitServices.Transactions import TransactionManager  
doc = DocumentManager.Instance.CurrentDBDocument  
doc1 = DocumentManager.Instance.CurrentDBDocument

clr.AddReference("RevitNodes")  
import Revit  
clr.ImportExtensions(Revit.Elements)  
clr.ImportExtensions(Revit.GeometryConversion)

clr.AddReference("RevitAPI")  
from Autodesk.Revit.DB import \*

from System.Collections.Generic import\*

ele = ListElementId  
sourceView = UnwrapElement(IN[1])  
destView = UnwrapElement(IN[2])

try:

newId = ElementTransformUtils.CopyElements(sourceViews, ele, destView, None, CopyPasteOptions() )

res1 = [doc.GetElement(newId[i]).ToDSType(False) for i in xrange(len(newId) )]  
except:  
TransactionManager.Instance.EnsureInTransaction(doc)  
newId = ElementTransformUtils.CopyElements(sourceView, ele, destView, None, CopyPasteOptions() )

res1 = [doc.GetElement(newId[i]).ToDSType(False) for i in xrange(len(newId) )]

OUT = res1

---

<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:** [October 8, 2018, 4:38am UTC](https://forum.dynamobim.com/t/python-multiple-input-instead-of-single-input/26932/2 "2018-10-08T04:38:32Z")

</div>

> [@Arsany123](#):
>
> i would like to read list of source views and list of destination views.

Check out the Lacing or @List Levels for multiple lists.

---

<div class="post-metadata">

**Author:** ![Arsany123](https://avatars.discourse-cdn.com/v4/letter/a/9e8a1a/32.png) [@Arsany123](https://forum.dynamobim.com/u/Arsany123)\
**Post date:** [October 8, 2018, 4:51am UTC](https://forum.dynamobim.com/t/python-multiple-input-instead-of-single-input/26932/3 "2018-10-08T04:51:35Z")

</div>

Thanks a lot @Kulkul for your fast support

 ![1](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/3/432e3bb7909841344e0cee4c74168d8a48f6cd7c.jpeg)

source views is two sections  
and destination views is two sections as well

---

<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:** [October 8, 2018, 4:52am UTC](https://forum.dynamobim.com/t/python-multiple-input-instead-of-single-input/26932/4 "2018-10-08T04:52:35Z")

</div>

> [@Kulkul](#):
>
> Check out the Lacing or @List Levels for multiple lists.

👆 do you know about lacing or List levels?

---

<div class="post-metadata">

**Author:** ![Arsany123](https://avatars.discourse-cdn.com/v4/letter/a/9e8a1a/32.png) [@Arsany123](https://forum.dynamobim.com/u/Arsany123)\
**Post date:** [October 8, 2018, 4:53am UTC](https://forum.dynamobim.com/t/python-multiple-input-instead-of-single-input/26932/5 "2018-10-08T04:53:34Z")

</div>

no iam not expert it is the first time to hear about it .  
can you explain to me if you donot mind

---

<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:** [October 8, 2018, 4:53am UTC](https://forum.dynamobim.com/t/python-multiple-input-instead-of-single-input/26932/6 "2018-10-08T04:53:56Z")

</div>

Sure not a problem have a look at this [http://dynamobim.org/introducing-listlevel-working-with-lists-made-easier/](http://dynamobim.org/introducing-listlevel-working-with-lists-made-easier/)

and this [http://primer.dynamobim.org/en/06\_Designing-with-Lists/6-1\_whats-a-list.html](http://primer.dynamobim.org/en/06_Designing-with-Lists/6-1_whats-a-list.html)

---

<div class="post-metadata">

**Author:** ![Arsany123](https://avatars.discourse-cdn.com/v4/letter/a/9e8a1a/32.png) [@Arsany123](https://forum.dynamobim.com/u/Arsany123)\
**Post date:** [October 8, 2018, 4:56am UTC](https://forum.dynamobim.com/t/python-multiple-input-instead-of-single-input/26932/7 "2018-10-08T04:56:14Z")

</div>

i will chck it out but i tried many inputs to source and destination views but it is only accepting views node.that is why i was wondering it is python issue

 ![Capture](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/b/5b58c4c48d10e3c69f9288cb5da4e14eeba42dda.jpeg)

---

<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:** [October 8, 2018, 4:59am UTC](https://forum.dynamobim.com/t/python-multiple-input-instead-of-single-input/26932/8 "2018-10-08T04:59:37Z")

</div>

> [@Arsany123](#):
>
> that is why i was wondering it is python issue

No it is not python issue. Custom nodes are made for handling multiple lists structure. Links which i provided above will help you.

---

<div class="post-metadata">

**Author:** ![Arsany123](https://avatars.discourse-cdn.com/v4/letter/a/9e8a1a/32.png) [@Arsany123](https://forum.dynamobim.com/u/Arsany123)\
**Post date:** [October 8, 2018, 5:01am UTC](https://forum.dynamobim.com/t/python-multiple-input-instead-of-single-input/26932/9 "2018-10-08T05:01:20Z")

</div>

i will check it out.  
thanks a lot for your support i really appreciate it

---

<div class="post-metadata">

**Author:** ![Arsany123](https://avatars.discourse-cdn.com/v4/letter/a/9e8a1a/32.png) [@Arsany123](https://forum.dynamobim.com/u/Arsany123)\
**Post date:** [October 8, 2018, 6:03am UTC](https://forum.dynamobim.com/t/python-multiple-input-instead-of-single-input/26932/10 "2018-10-08T06:03:36Z")

</div>

Hello @Kulkul  
i have tried list mapping from the link you have send to me but still not working i think any kind of list is not accepted to be as input to this node  
what i want is to trasnfer from section S1 to S1A and From S2 to S2B  
.

 ![111111](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/f/5f389c1f82e7937fef6459c3f025e11657a5f420.jpeg)

---

<div class="post-metadata">

**Author:** ![Arsany123](https://avatars.discourse-cdn.com/v4/letter/a/9e8a1a/32.png) [@Arsany123](https://forum.dynamobim.com/u/Arsany123)\
**Post date:** [October 10, 2018, 6:11am UTC](https://forum.dynamobim.com/t/python-multiple-input-instead-of-single-input/26932/11 "2018-10-10T06:11:32Z")

</div>

hello @Kulkul  
any advice please??

---

<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:** [October 10, 2018, 6:23am UTC](https://forum.dynamobim.com/t/python-multiple-input-instead-of-single-input/26932/12 "2018-10-10T06:23:43Z")

</div>

Share your rvt file here.

---

<div class="post-metadata">

**Author:** ![Arsany123](https://avatars.discourse-cdn.com/v4/letter/a/9e8a1a/32.png) [@Arsany123](https://forum.dynamobim.com/u/Arsany123)\
**Post date:** [October 10, 2018, 6:40am UTC](https://forum.dynamobim.com/t/python-multiple-input-instead-of-single-input/26932/13 "2018-10-10T06:40:26Z")

</div>

hello @kulkul  
i would like to coy all annotation from sections S1 to S1D and from S2 to S2E  
thanks a lot

[https://we.tl/t-8XCKDvOhd2](https://we.tl/t-8XCKDvOhd2)

---

<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:** [October 10, 2018, 7:04am UTC](https://forum.dynamobim.com/t/python-multiple-input-instead-of-single-input/26932/14 "2018-10-10T07:04:34Z")

</div>

@Arsany123 This should work [Copyelements(For Arsany).dyn](https://forum.dynamobim.com/uploads/short-url/3AiLzwQIoa0U5PyLh4aoKKvcjBh.dyn) (19.9 KB)

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

---

<div class="post-metadata">

**Author:** ![Arsany123](https://avatars.discourse-cdn.com/v4/letter/a/9e8a1a/32.png) [@Arsany123](https://forum.dynamobim.com/u/Arsany123)\
**Post date:** [October 10, 2018, 7:51am UTC](https://forum.dynamobim.com/t/python-multiple-input-instead-of-single-input/26932/15 "2018-10-10T07:51:21Z")

</div>

hello @Kulkul  
thanks a lot i really appreciate . thank you soo much. it works just if started with sections but i want to read from the created sections directly and no need to selct the desired sections.  
but just to confirm the input to list chop must be from type ?? because i tried to use the the output from list transpose (elements as in the fourth snap shot) as an input to list chop but it didn’t work ??

---

<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:** [October 10, 2018, 7:56am UTC](https://forum.dynamobim.com/t/python-multiple-input-instead-of-single-input/26932/16 "2018-10-10T07:56:03Z")

</div>

> [@Arsany123](#):
>
> thank you soo much. it works finally.

@Arsany123 Please mark the post as solved. You’re Welcome!

---

<div class="post-metadata">

**Author:** ![Arsany123](https://avatars.discourse-cdn.com/v4/letter/a/9e8a1a/32.png) [@Arsany123](https://forum.dynamobim.com/u/Arsany123)\
**Post date:** [October 10, 2018, 8:19am UTC](https://forum.dynamobim.com/t/python-multiple-input-instead-of-single-input/26932/17 "2018-10-10T08:19:03Z")

</div>

@Kulkul Sure. it is marked as a soltution

---

<div class="post-metadata">

**Author:** ![gregorio.palermo](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/gregorio.palermo/32/75902_2.png) [@gregorio.palermo](https://forum.dynamobim.com/u/gregorio.palermo)\
**Post date:** [June 7, 2019, 1:17am UTC](https://forum.dynamobim.com/t/python-multiple-input-instead-of-single-input/26932/18 "2019-06-07T01:17:45Z")

</div>

Hi to All,

I have question? How is this script has advantage to revit process copy to clipboard and Align to selected views? I made some Run and testing in revit and looks like the same. Please enlightened me Master Jedi?

Regards,  
Greg

 ![copy%20elements%20from%20views%20to%20destination](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/1/81f24b3531f5fdea65257ff4e608e52c7b775eda.png)
