I have a number of dynamic components all with a custom attribute name Y10_PartNumber. I would like to have a ruby script that would take all the instances and assign a sequential number to them. For example if there 30 different components or instances I would like to assign numbers 1-30 to that Y10_PartNumber attribute in the dynamic component.
I only need the script as I can create my own toolbar and input the script.
Script should renumber all once button with script is pressed.