• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How can I get the selected file with context menu?

New Here ,
Nov 22, 2020 Nov 22, 2020

Copy link to clipboard

Copied

Hello.

I'm handling a ditamap file with FDK.

I would like to know the selected file name when I exceutes a context menu command at the ditamap pod.

I added my code below.

 

#define GET_FILE_NAME 1

 

VoidT F_ApiInitialize(IntT initialization)

{

   F_ObjHandleT specialMenuId;
/* Get the ID of the special menu. */
specialMenuId = F_ApiGetNamedObject(FV_SessionId, FO_Menu, (ConStringT)"!DitamapContextMenu");
/* Define the commands and add them to the Special menu. */
F_ApiDefineAndAddCommand(GET_FILE_NAME , specialMenuId, (ConStringT)"GetFileName", (ConStringT)"Get File Name", (ConStringT)"");

}

 

VoidT F_ApiCommand(IntT command)
{
  switch (command)
  {
    case GET_FILE_NAME :
       F_ApiAlert((ConStringT)"The file name is...!", FF_ALERT_CONTINUE_NOTE);

      // I want to get the selected file name here.

    break;
  };

}

 

Thanks.

 

TOPICS
Getting started

Views

65

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation