Workspace: IWxWorkspace;
The Workspace property determines the problem workspace.
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: IMetabaseObject;
prob: IMsProblem;
space, obj: IMetabaseObject;
Workspace: IWxWorkspace;
Begin
Mb := MetabaseClass.Active;
parent := Mb.ItemById("OBJ_TRANSFORM").Bind;
space := Mb.ItemById("OBJ_WORK").Bind;
obj := FindObject(parent, "OBJ_PROBLEM").Edit;
prob := obj As IMsProblem;
Workspace := space As IWxWorkspace;
prob.Workspace := Workspace;
obj.Save;
End Sub Main;
After executing the example the OBJ_WORK workspace is included to the OBJ_PROBLEM problem.
See also: