get info on current folder when calling from a Menu Item

When calling a document menu item I can use this get info about the selected document

HDOCCMDPARAM  hDocParam;
LPAADOC_ITEM lpDocItem;  // a struct of projectID and docID

hDocParam = *((HDOCCMDPARAM*)lpCommand->lpParam);
lpDocItem = (LPAADOC_ITEM)aaApi_GetDocCmdParamElements(AADOCCMDPT_DOCUMENT1, hDocParam);

What is the corresponding code for a Project menu item ?

eg. If we replace HDOCCMDPARAM  with LPAACMDPARAM, what is the variable that is returned, that should hold the Project information ?

thanks in advance
René

  • Rene,

    I'm not sure of the context of your question.  Assuming that you are using the PW SDK Menu functions, then I suspect that _AATWOIDS is what you are looking for.

    If you are using an .mrr file for your menu items, then the folder/project/rich project id is passed to your function that you identify in the .mrr file.

    Answer Verified By: Rene Lloyd 

  • Yes, I am calling the PW SDK Menu function with lCommandType = AAMENU_PROJECT.

    so

    _AATWOIDS p = *((_AATWOIDS*)lpCommand->lpParam);

    gives me

    p.lItemId which seems to be the project ID, which was what I needed.

    Can you tell me what the other two values are ?
    p.lParam
    p.lParam2

    Thanks
    René

  • Yeah, the documentation doesn't really make it clear.  Based on other structures that I have used, the "primary object identifier" is as you noticed, is the project id (folder id).  I suspect that in this case, there is no "secondary object identifier".  This idea of "primary" and "secondary" object ids is used in several places in the API, and typically, it is things like Project ID and Document ID, or Workflow ID and State ID, etc., but sometimes the secondary id is not used and typically is set to zero.

    You should be able to get anything you need to know about a project/folder/vault by selecting that object with the various API select functions for project/folders/vaults/rich projects and then using an appropriate "Get" function to retrieve the property(ies) that you are interested in.