How to create ElementSet from list of elements in Dynamo

python
#1

Hello

I have tried reading up on this, and as far as I have understood it this far, this is my question:
How do i create an ElementSet from an input list of Revit elements?

I want to input elements into Python, and add them to a circuit. Python says it wants ElementSet. How do I convert it to an ElementSet?
On this Python script IN[0] is just the list of the elements, and IN[1] is the Circuit element.
image

Here is a picture of the working script where i input a circuit, and get the “Elements” from it, which actually is read as an ElementSet, and move that ElementSet over to another circuit.

What I want to be able to do (for now) is to input elements and convert them to an ElementSet, like shown in the picture above where the arrows with the questionmarks are.

On a sidenote: What should I categorize basic python coding questions as?

0 Likes

#2

hi @andre.abotnes

2 Likes

Python Nodes Basics
#3

YES!
Thank you!
I love you 3>

That was (not surprisingly) very simple

1 Like

#4

:joy: you’re welcome

0 Likes

#5

Now to the second part of my problem!

What you helped me do now is to “reassign” elements to another existing circuit or ElectricalSystem.
I want to be able to create a new Electrical System connected to an input Panel.

Any clues how to do that?

Here is what I have so far based on Mostafa_El_Ayoubi’s help :slight_smile:

0 Likes

#6

@andre.abotnes you should start a new thread because this is a different issue.
Also, when you do create the new thread, please copy paste your formated code using this button:

image

1 Like

#7

Thanks, will do!

0 Likes

#8

I’m sorry I forgot your advice about copying the code. My short term memory is not really impressive as of late :wink:

0 Likes