Not sure why you want to scan all the models. There might be easy solution if I know what you really want to achieve.
However to help you out this is how you can achieve your objective/s
var db= ArisData.getSelectedDatabases()
It will give you array of databases.
Considering you want to check only the first one.
you can get the root group of the db like this.
It will let you get the main group of the selected db.
var selModels=selRootGroup.ModelList(true);//so that you get the models in the sub group also.
there are different method also depending on what type of model you want or based on Model name etc.
Hope this helps.
Thanks a lot Abhijit Das
I will use your solution.