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, a modeling container with the OBJ_TRANSFORM identifier. This modeling container must include a problem with the OBJ_PROBLEM identifier.
Sub Main;
Var
Mb: IMetabase;
parent, obj: IMetabaseObject;
prob: IMsProblem;
Workspace: IMetabaseObjectDescriptor;
Begin
Mb := MetabaseClass.Active;
parent := Mb.ItemById("OBJ_TRANSFORM").Bind;
Workspace := Mb.ItemById("OBJ_WORK");
obj := FindObject(parent, "OBJ_PROBLEM").Edit;
prob := obj As IMsProblem;
prob.WorkspaceDescriptor := Workspace;
obj.Save;
End Sub Main;
After executing the example the OBJ_WORK workspace is included to the OBJ_PROBLEM problem.
See also: