Hello.
I start my adventure with dynamo and I I want to do a script that will export circuits to excel.
I have a problem with filtering the list by the name of the switchgear. How can I do this?
You could use group by key, but it’s hard to say without seeing your entire graph
Okay, a few things you could do:
-
Use Element.GetParameterValueByName instead of “Parameter.ParameterByName” and “Parameter.Value”
-
Do not use several “Data.ExportExcel” nodes, use a single node and organize your data before feeding it to the export node…
-
Use List.GroupByKey to organize your lists/values using your name of the switchgear as keys… The node works like so:
-
If you on the other hand wish to filter out certain values and only get some of the names to pass through you can use a List.FilterByBoolMask that works like so:
-
If you wish to simplify even further you can get all your parametervalues using a single node instead of several
Keep in mind I’m using “List level” (the little @1) which is achieved by clicking the rightfacing arrow on the node) and that you’re using Dynamo 2.0 which will mean that my “{” will be “[” in your version of Dynamo
Thank you for your help! It works
You are very welcome, and welcome to the adventure that is Dynamo If you encounter additional issues feel free to ask the forum just remember to add as much information as you can to your post like: what happens (errors,previews etc) and what did you expect to happen (what did you wish should happen)
Cheers
Thank you very much! I hope my adventure with Dynamo will be good.
I have new problem with sorting.
The number are not in proper order.
I see, try and use either list.sortbykey or list.sort