I thought that was really a simple procedure but I couldn’t find a solution here in the forum.
All I want to do is to be able to vary a slider, do some calculations, get a list of values and append it to a “main” list of lists (Which would be initially empty). Then whenever I change the intial values, some calculations will take place, and the output list of values should be appended to the main list. At the end, the list should be copied to a csv file.
A very simple script is attached where i want to vary a step of a sequence, and then add it to a list of sequences, and then re-vary the step and add the new one to a main list that keeps track of every generated sequence and so on.
Hi,
These operations are for a predetermined number of lists in a list. What I want to do is to be able to do this indefinitely.
It should function as the append method in python for example. It should recursively add a new list to an existing list of lists after varying the initial parameters.
Your problem requires recursion since it depends on the previous state to generate the current/new state. This is visual programmings Achilles heel unfortunately! You could try writing the data to a txt file after processing, retrieve it for the next run, perform List.Join to achieve the desired result then write to Excel.
Hi Thomas,
I thought of something similar. But when I try to do that and read from the CSV file I wrote the data to, I get this message "Warning: One or more of the input types are not matching. Couldn’t find a version of ReadFromFile that takes arguments of type (string)"
Hi @Mekawy ,
yes but you’d have to store the previous data somewhere… here’s one way you could achieve what you want, using an excell sheet to store the data and visual programming :
@Mekawy - I am curious about what task you are trying to accomplish. What context do you need this functionality in? The reason I ask is because we are working on designing/prototyping looping nodes for Dynamo and am trying to figure out use cases. Your problem seems to be a good one. Can you clarify why you are trying to accomplish this? In what workflow/context?
Also, you can use Imperative nodes to do recursion…Hope that helps. Let me know if this is what you were looking for.
Hi Mostafa,
Thank you for the detailed solution. However, I can’t seem to understand the logic you implemented behind “start row” and “start column”. Dynamo throws an error when I do exactly as you did.
Hi Racel,
This looks good, with the exception that I need the final list to be nested. The reason being that I want to use the output to produce charts based on some analytics made on the design scheme. So I need distinct “records” of each design variation to be fed in a stacked bar chart for example.
the logic is that list count gets the number of colums containing data in the excel file.That information helps specify which column to write the next list of numbers.
@Mekawy- Interestingly, have you ever used presets? We were just talking about these today. They might be useful to you as you are looking at design variations…