Ms > Ms Assembly Interfaces > IMsProblem > IMsProblem.Workspace
Workspace: IWxWorkspace;
The Workspace property determines the problem workspace.
Executing the example requires that the repository contains a workspace with the OBJ_WORK identifier, and a modeling container with the OBJ_TRANSFORM identifier. This modeling container must include a problem with the OBJ_PROBLEM identifier.
Sub UserProc;
Var
Mb: IMetabase;
parent: IMetabaseObject;
MsKey: Integer;
prob: IMsProblem;
space, obj: IMetabaseObject;
Workspace: IWxWorkspace;
Begin
Mb := MetabaseClass.Active;
parent := Mb.ItemById("OBJ_TRANSFORM").Bind;
MsKey := Mb.ItemById("OBJ_TRANSFORM").Key;
space := Mb.ItemById("OBJ_WORK").Bind;
obj := MB.ItemByIdNamespace("OBJ_PROBLEM", MsKey).Edit;
prob := obj As IMsProblem;
Workspace := space As IWxWorkspace;
prob.Workspace := Workspace;
obj.Save;
End Sub UserProc
After executing the example the OBJ_WORK workspace is included to the OBJ_PROBLEM problem.
See also: