Selection by Order

Is there any way to get selection in order from first to or last in sketchup? I’m trying to find a logic to make the ad_id attributes be modified based on a selection

I’m developing a stage design plugin with support for .mvr files for sketchup

You need to make a new Tool of your own - you can initially clear any existing selection, then create a new blank array to start off with, and then add objects to the selection and the array as you select then one at a time… The selection will be incremented as you pick, skipping any duplicates in the array. The array is ordered in the picking order. You can’t find the order of a pre-picked selection…