setActiveDocument
Overview
This utility is used to set any one of the multiple opened databases as active one and perform the operations in them.
Syntax
simlab.setActiveDocument(DataBaseIndex or DataBase Name)
Why we need this utility?
Let us consider an Assembly with large number of Sub-Models and we need to export each Sub-Model as a separate database and open them side by side. In this process we need to return to the database containing the assembly after opening the previously exported Sub-Model database in order to export the remaining Sub-Models. By using this utility, we can set the database containing the assembly as active one.
Sample

Note: Sample Script