Copy link to clipboard
Copied
Hi,
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
else
{
F_FdeInit();
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.
F_SetICUDataDir(icu_dir);
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.
Thanks
Have something to add?
Find more inspiration, events, and resources on the new Adobe Community
Explore Now