Python multiple input instead of single input

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

#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

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

Thanks a lot @Kulkul for your fast support

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

:point_up_2: do you know about lacing or List levels?

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

Sure not a problem have a look at this 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

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

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

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

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
.

hello @Kulkul
any advice please??

Share your rvt file here.

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

@Arsany123 This should work Copyelements(For Arsany).dyn (19.9 KB)

2 Likes

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 ??

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

@Kulkul Sure. it is marked as a soltution

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