filter into a dynamo script

filter into a dynamo script

Anonymous
Not applicable
1,627 Views
3 Replies
Message 1 of 4

filter into a dynamo script

Anonymous
Not applicable

Hi all
i always stayed away from Dynamo as it looked very deep and dificult to me.
Last week i gave it a chance and now I really like to creat script .

on my HVAC plans, I managed to create a script to number automaticly my Ducts and Ducts fittings.
My script catch the system abbreviation and mix it with numbers.

 

 

To make my script better, I would like to start the numer at 0 for each system.

To explain myself: actually on a plan with two systems (supply air / Exhaust air), my script create me a duct number SA-01/SA-02/SA-03… but also a EA-05/EA-06
Actualy, the number follow the last one doesn’t matter on witch system it is.

I would like to have a duct number SA-01 but also a EA-01
Do you understand me?

I tryed to select the elements but this node allows me to do it nly with selection not with the system (with TAB)
a filter node could be an option but I don’t really understand them,

Does anyone could help me please?

script dynamo.JPG

Thanks
Baptiste

0 Likes
Accepted solutions (1)
1,628 Views
3 Replies
Replies (3)
Message 2 of 4

L.Maas
Mentor
Mentor
Accepted solution

Good that you make th effort. You will not be sorry.

 

Something like this might do the trick to get you further

Capture.PNG

So what I do is:

-Extract the system abbrevation from the elements.

-Use those to group all elements with the same system abbrevation

-Use a count node to count all elements in a group
-Use the count to create a sequency (1 to count)

-Then create the string and store them in a parameter (I used comments)

 

Script attached

 

Note: When posting a question about Dynamo, it helps if you can also attach the script, saves recreating the script

 

Louis

EESignature

Please mention Revit version, especially when uploading Revit files.

0 Likes
Message 3 of 4

Anonymous
Not applicable

thanks Louis,

 

I finaly get where I wanted to go with the help of 2 colleagues.

We also used your strategy .

 

Here is the script for 4 different systems

 

Capture.png

0 Likes
Message 4 of 4

MuirEng
Collaborator
Collaborator

try also researching / posting Dynamo questions at https://forum.dynamobim.com/

 

Brian Muir, P.Eng, Muir Engineering
0 Likes