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

How to connect to a new framemaker session programatically

Community Beginner ,
Sep 01, 2022 Sep 01, 2022

Copy link to clipboard




I am working on some functionality which opens a new framemaker session and tries to connect with it.

Currently in the application if framemaker is somehow closed we need to restart the application from start. I have added a button in app which actually open a new framemaker session but lookslike it is not in sync with the app, I have the following code which tries to make a connection with framemaker. 


int FrameSession::ConnectToSession()
FontEncIdT feId;
StringT encName;
// Connect to the frame session
if (!F_ApiAlive()) F_ApiStartUp(NULL);

if (!F_ApiAlive())
return 6; // No Registered Connection

encName = F_ApiGetString(0, FV_SessionId, FP_DialogEncodingName);
feId = F_FdeInitFontEncs((ConStringT) "FrameRoman");

/*Get Path for ICU Data Directory */
ConStringT icu_dir = F_GetICUDataDir();

/// Set Path for ICU Data Directory for ICU Mappings.
return 0; // Connected to session successfully


Same piece of code works when application initially open and connects with framemaker,  if this intial framemaker session is closed and i try to open new session through above mentioned button it also return 0, which means successful connection as per comments in the code snippet but when i try to open a book, it is not opening any book.


Any help to open and connect with framemaker session would be appreciated.







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