FRAMES | NO FRAMES
CreateWorkspace Method

Creates a new workspace.

Availability: Business Analyst Server.

void CreateWorkspace ( 
    string  WorkspaceName 
);

Parameter Description
WorkspaceName New workspace name. Type String.

Remarks

If the workspace to create already exists, this method has no effect.

Examples

The example below creates a new workspace in the Business Analyst Repository.

C#
// Instantiate the BAServerHelper class to access analysis methods
BAServerHelper baServerHelper = new BAServerHelper();
 
string newWorkspace = "workspace_CreateWorkspace";
 
// Create a new workspace
baServerHelper.CreateWorkspace(newWorkspace);
 
// Get the list of all workspaces and ensure that the given workspace exists
string[] workspaces = baServerHelper.GetWorkspaces();
bool workspaceFound = Array.IndexOf(workspaces, newWorkspace) >= 0;
 
// Delete the workspace
baServerHelper.DeleteWorkspace(newWorkspace);

See Also