CustomGame.MapIDFromName(string map)
Syntax
public Map MapIDFromName(
    string map
)

map
Map name to get ID from.
Type: string

Get ID of map from name.

The example below will switch the current map to Hollywood.

using System;
using CustomGameOW;

...

static void Main(string[] args)
{
    CustomGame cg = new CustomGame();
    cg.ModesEnabled.Assault = true;
    cg.ModesEnabled.AssaultEscort = true;
    cg.ModesEnabled.Control = true;
    cg.ModesEnabled.Escort = true;
    string mapname = "ae_Hollywood"; // Map name
    Map mapID = cg.MapIDFromName(mapname); // Get map ID from mapname
    cg.ToggleMap(mapID, true); // Disable all maps except Hollywood
}