Name GetWorldList
Type Method
Summary Gets the list of open worlds
Prototype VARIANT GetWorldList();
Description Returns a variant array which is a list of all open worlds.
VBscript example
for each name in world.GetWorldList
  world.note name
next
Jscript example
worldlist = new VBArray(world.GetworldList()).toArray();

if (worldlist)  // if not empty
 for (i = 0; i < worldlist.length; i++)
   world.note(worldlist [i]);
PerlScript example
foreach $item (Win32::OLE::in ($world->GetWorldList))
 {
 $world->note($item);
 }
Returns If there are no worlds then the return value is empty. Use "IsEmpty" to test for this possibility.

Otherwise, it returns a variant array containing the names of all the worlds. Use "ubound" to find the number of worlds in the list. You can then use "GetWorld" to return a reference to that world.

See also ...