How to use xy coordinates from CSV file as PositionList?

I would like to make the stage move sequentially through a hundred coordinates which are all listed in a CSV file. How would I go about converting those to a PositionList?


Hi Nabila,

This involves 2 tasks, first reading position values from CSV and second creating a PositionList with those values.

I don’t know how to read the CSV but it seems very achievable and an internet search reveals other people have worked on it.

Here is a script I have used to create a position list of grid locations using for loops. Something similar should work to create the PositionList once you have the position values.

makeYZGrid.bsh.txt (1.0 KB)

1 Like

I would try to write a script (python) to convert between the csv and the preferred format for the beanshell script. I prefer python for such tasks.

1 Like

Thanks. For complicated patterns I can create multiple for loops and it should work.