Matter Worklist Right-click

Hi all.

i am working on a function, that will need to be called from the context menu of the Matter WorkList.

When creating iCommands for the folders or the WorkSpaces, I would normally get the mContext.Item("SelectedFolderObject").ObjectID property, but this doesn't work from the Matter WorkList.

Does anyone know which Item in mContext, I should read ?
I can see, there are 13 items, but not what thir names are.

Regards,
Morten

Comments

  • Hi Morten,

    Have you found a solution to your problem I'm having the same dificulty in getting the context workspace.

    Thanks
    Pedro
  • Unfortunately not Smiley Sad

    It would be really great to get a better documentation
  • The My Worklist node is represented in the API by the IManWorkArea.RecentWorkspaces collection

    That is a collection of type IManWorkspace

    The context you're therefore looking for is the one which returns you the current session. From there you can access the WorkArea property and query the RecentWorkspaces collection

    There are 4 context items returned by a FileSite ICommand on the My Worklist node that will return you the IManSession. They are
    • SelectedIManObject
    • SelectedContentsContainer
    • DestinationObject, and
    • IManDestinationObject
    So you might use the following code in your ICommand.Execute method if you want to access the current recent workspaces collection:
    var session = (IManSession)Context.Item("SelectedContentsContainer");
    MessageBox.Show(string.Format("There are {0} recent workspaces.", session.WorkArea.RecentWorkspaces.Count));
    Context in the above example represents the collection of ContextItem objects returned by the ICommand.Context property

    thanks
    Guido
  • Thanks, Guido

    I'll give it a try Smiley Happy
Sign In or Register to comment.