I'm using the following code to get the selected containers:
In the cnt_ids array I get the ids of the selected containers. But I would like to make sure that the array is ordered, meaning that, if the whole hierarchy of the scene is opened, the first element of the array would correspond to the selected container this is the first selected from top to bottom... and so on, until the last element of the array corresponds to the selected container this is the lastselected from top to bottom.
Is there any way to assure that the array is sorted in that way. Or, at least, a way to get the selected container in the order they were selected.
Code:
dim cnt_ids as Array[String]
dim cmd,answer,sceneuuid as String
sceneuuid = Scene.Uuid.FullString
if sceneuuid = "<00000000-0000-0000-0000000000000000>" Then exit sub
cmd = sceneuuid & "*EDITED_OBJECTS GET"
answer = System.SendCommand(cmd)
answer = answer.GetSubString(1,answer.Length-2)
answer.Split(" ",cnt_ids)
In the cnt_ids array I get the ids of the selected containers. But I would like to make sure that the array is ordered, meaning that, if the whole hierarchy of the scene is opened, the first element of the array would correspond to the selected container this is the first selected from top to bottom... and so on, until the last element of the array corresponds to the selected container this is the lastselected from top to bottom.
Is there any way to assure that the array is sorted in that way. Or, at least, a way to get the selected container in the order they were selected.