Report all modele into data base

Translate this pagebookmark or share this page
Julien's picture

Posted: 2011-11-22
1149 views | 2 comments | category: ARIS Community

0
show all articles

Hi evrybody,

I have this :

var db = ArisData.getSelectedDatabases();
var models = db.get ????

I would like collect all modeles this database for after scan models.

 

I have this for scan :

for(var i=0;i<models.length;i++){
       ...
    }

How resolved my problem ?

 

Thanks you in advance.

Comments
Abhijit's picture

Hi Julien,

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.

var selRootGroup=db[0].RootGroup().

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

Abhijit Das

abhijit.das@cba.com.au

 

Julien's picture

Thanks a lot Abhijit Das

I will use your solution.