If I were to script this what would be the easiest way? I am thinking now that the parts would have to be sequential in reference value. I don’t see a way to GetModulesHighlighted() or similar. So I would have to:
for i = start to finish
get module by reference('reference letter' + i)
Is there a better way to go about that? Is there a way to get selected?
The rest of the code is pretty easy:
R = radius
N = number of objects
X = Center X Cord
Y = Center Y Cord
A = Start Angle
For i = 0 to N-1
module.setX = R*sin(I*2π/N)+X
module.setY = R*cos(I*2π/N)+Y
Module.setAngle = 360/N*I+A
You might tale a look there. If it lacks features I am more than willing to accept a PR. But if you want to make your own I can give you a pointer here and there.
As for placing only selected footprints in circle you have to go through all footprints and test each if it is selected. Then there is a question how do you arrange (sort) them. Probably by increasing reference number makes most sense and the first one should be on top.