Dynamo Revit: Automatic Mark numbering based on circuits

Hi Guys,

I’m new on the forum and it’s my third day discovering the magic of Dynamo! :smiley:
I am very enthusiastic about how efficient and time-saving Dynamo is for repetitive tasks.

An example of this is I’m looking for a way to number our electrical components based on which circuit they are in.

just an example:
3 sockets in circuit 1
3 sockets in circuit 2
5 outlets in circuit 3

then the numbering of the components should look like this:

for Circuit 1:
1.1
1.2
1.3

for Circuit 2
2.1
2.2
2.3

for circuit 3
3.1
3.2
3.3
3.4
3.5

I was able to set this up with information from other forum topics. but it’s not what it should be yet.
My attempt will probably make many laugh because it can probably be many times more efficient, but hey, we all have to start somewhere! :wink:

If someone could help me with this I’d be thrilled. If this or something similar has been discussed in another post, my apologies in advance. it is sometimes difficult to search for something if you have not yet mastered the right search terms.

Thanks in advance!
Best regards,
Bjarne

No, we all have been there.

This :point_up_2:.

What you have set up so far looks good, but it is not clear what you want it to be.
What is the end result you are loooking for?
If it is writing the data to the Families in example? (Element.SetParameterByName)

hey thanks for your interest in helping me with this!

I’ll show you what I already have and then what I eventually want and why.

now I have already managed to number all components according to our current system.

+0 STPC 3 #1

This stands for:
+0 = level
STPC = component, in this example wall socket
#1 = to which panel this component is connected

for our application we must also be able to see which components are on the same circuit via the name of the component

we do this by:

+0STPC1.001#1
+0STPC1.002#1
+0STPC1.003#1

here we see from the name that it concerns 3 sockets, all at level +0, the same circuit and go to panel 1.

I have meanwhile found how to perform the numbering per circuit.

only I don’t get it in my current name. I think this is because the output is a sublist of a list?
it accepts it until Element.SetParameterByName.

When I look in Revit, the outcome is not good.

Circuitnamecode.dyn (54.3 KB)

I did it!

Adding a list.flatten did the job :smiley:

2 Likes