In my case I retrieve all spaces and filter out all parameters that have the value “SWN_Space_Socket …”. Then I search for a value 1-10. Instead of having to copy the entire script after each individual number, how can you do this effectively so that the program itself understands that for example the number “7”, will place 7 elements at a given coordinate?
Basically, I want to create a program that places the number of elements based on which number I enter in the shared parameter.
Take your number parameter, if it’s a number stored in a string you’ll have to convert the data type (there’s a node for this, “string.toInteger” or something similar), else carry on. You can then make a ‘list of repeated item’ of the family, using this value for the amount. You’ll then have to play around with list levels so your coordinates apply to all 7/3/4/whatever items in that sublist, or alternatively just apply the same list of repeated item to your coordinates (assuming of course you want the same coordinates and aren’t to modify these for each of the 7/8/3/2/whatever items.