Looping...?

Hi all,
I am not even sure how to search for this…

See attached: is there a way to achieve this looping?

Basically I need:

  1. assign next value to the element parameter (it just switches the type of a legend component)
  2. export image of view (of the legend)
  3. loop to 1. until there are types in the list

Thank you

PS: is there a node (or strategy) to export a view of a family? Sort of a preview builder? I am trying to achieve this by placing a legend component, and then exporting the legend as an image. This is for legends, like light fixture legends, furniture, etc.

You don’t need a loop, just a list.

The way you’ve wired that up is that you have 1 element and you want to set the parameter’s value 3 different ways.

Your ‘element’ should be your element type.

Element is the item with the parameters you want to name.

Try this thread: Set Type Parameter - #13 by diegus68

Thank you Alien,

The assignment of the type(s) to the legend components (the element I am working with) works fine: I have a list of types, and they need to be assigned to the element one after the other.

This works.

What I also need is: for each value of the parameter (the type) I need to refresh the view and save as image.

All I am doing is creating a catalog of images of all the types in the list.

The problem is that I don’t have any way to put the “save as image” node between each parameter assignment.

Makes sense?

Maybe I need a custom mode that takes the list of the types, then changes type and save the image, then takes the next valore in the list and does the same…

But custom modes are so cumbersome to manage (publish…)

Thank you

Regards

Giovanni

Here is what I got so far. If the group to the right is swapped with the custom node, it kind of works.

Any way to make it work without custom node?

Script (does not work):

Custom Node:

Thank you

regards

gio

Hello, I am trying to now use design script, with a double FOR loop.

Of course, I am clueless of what I am doing… :frowning:

Anyone could give me some pointers here?

Here is what I got: you can see the source data, and what I have in the code block.
The two FOR loop need to be in parallel: in this case, 5 values and 5 paths should be used: a,a b,b c,c etc. forming 5 couples of data, not 25. Values and Paths should always be same depth lists, while “ele” should always be just one element.

Thank you!

regards

gio