I am trying to build a graph that sequentially pulls sheet reference numbers, sheet by sheet, and then populates a property field with those numbers. I’m trying to do most of the task within a python node, just utilizing a list.map to run the function sheet by sheet. I keep running into issues where all the outputs are null, in some cases, a list of nulls. I have tried scripts as simple as this
IN_value = IN[0]
OUT = “Hello from Python”, IN_value
..and still received “null”. I am fairly new to Dynamo and any help would be appreciated
.
I do not believe that a Python node can work with a List.Map. You’ll either need to make it into a custom node or modify the Python to accept a list of elements.
Thank you! Embedding my python script into a custom node enabled it to work with a list map. Now just gotta trouble shoot several other issues 
Just to provide some additional context/clarity, the List.Map node requires a Function input. A Function is a particular type of Dynamo output that represents… well… a function. It typically comes from an “incomplete” node, where a missing input is now a variable within the function returned by the node. List.Map then replicates the input list to the provided function by passing each input in the list as the missing variable in the function.
All of that is to say that List.Map is almost entirely an outdated method for replicating inputs at this point. List levels do the same thing and give you more control with fewer nodes.
2 Likes
Okay…I appreciate you elaborating on this. So regarding if a List.Map is the most effective way to accomplish my task, a better understanding of what I’m trying to accomplish maybe helpful…
I am currently trying to pull the sheet numbers of all the referenced sheets on a sheet, create a list of said referenced sheets, then push the list into a “Referenced Sheets” parameter.
I am trying to loop this task so that it runs the function 1 sheet at a time for 20+ sheets. I previously made a graph that successfully ran this task, but it runs all the sheets at once and it only wants to record any given sheet as a “Referenced Sheet” once. There are instances where “Sheet A” is referenced on 5 different sheets, but the graph will only list “Sheet A” on the first sheet that has it referenced.
I have recently decided to try the python route (within Dynamo) instead but I am open to a graph based/script based/or combined solution.
1 Like
Do you have a definition in your Python which takes a sheet as an input? If so sharing the Python script will be the fastest way to get a path forward.
If not, transitioning to that might be the “best” path forward, but you could also pass the sheets you want to process into your custom node and let the Python work as is.