Hi all,
Hopefuly someone can help me with this!
How can I show tree of objects and models from a certain database in a dialog box with script?
Every one of them to have option to be selected by the user, with possibility of multiple selections
Thank you!
Rene Broll on
Maybe this could help you:
Dialogs.showDialog(new myDialog(), Constants.DIALOG_TYPE_ACTION, "Just a test") function myDialog(){ this.getPages = function() { var iDialogTemplate1 = Dialogs.createNewDialogTemplate(600, 300, "First page"); iDialogTemplate1.PushButton(15, 20, 150, 30, "Select Models", "btn1"); iDialogTemplate1.PushButton(15, 80, 150, 30, "Select Objects", "btn2"); return [iDialogTemplate1]; } this.btn1_pressed = function(){ var userModel = Context.BrowseArisItems("Select an model", "Select an model to edit (...) .", Constants.CID_MODEL); // Do Something } this.btn2_pressed = function(){ var userObject = Context.BrowseArisItems("Select an object", "Select an object to edit (...) .", Constants.CID_OBJDEF); // Do Something } }If the user should only see one database you can use this code:
var userModel = Context.BrowseArisItems("Select a model", "Select a model for XYZ", Context.getSelectedDatabases()[0], Constants.CID_MODEL);
I hope this is what you looking for..