Ms > Ms Assembly Interfaces > IMsProblem > IMsProblem.WorkspaceDescriptor
WorkspaceDescriptor: IMetabaseObjectDescriptor;
The WorkspaceDescriptor property determines the object that contains problem workspace description.
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: IMetabaseObjectDescriptor;
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;
prob.WorkspaceDescriptor := Workspace;
obj.Save;
End Sub UserProc;
After executing the example the OBJ_WORK workspace is included to the OBJ_PROBLEM problem.
See also: