The script I want to write simply changes an object attribute value for all selected objects but what I find is that it will do 1, I assume the first one it finds, and ignores all of the rest. The case is that I select a number of parcel polygons and run the script, only one has had the "Pop" attribute changed to the value I specify, i.e. 99, the rest of the polygons do not change. The code is rather simple:
Sorry, my mistake, so I'm answering my own enquiry. The line should not read "ce.setAttribute(ce.selection() , 'Pop', 99)" but rather "ce.setAttribute(ce.selection, 'Pop', 99)". No "() " is required, this would limit the setAttribute function to the first item in the selection set, removing that it allowed the setAttribute to act on all objects in the selection.