Copy link to clipboard
Copied
Hi in my FMClient I have the following method for checking if API is alive: bool FMClient::IsConnected() { return F_ApiAlive() > 0; } After I connect to FM with F_ApiStartUp the IsConnected method returns true. However, If the user closes the FM application then this method still continue returns true. How can I check if the FM application is alive and the FMClient is connected with it? Should I run and test an API call? e.g. Try to get the current active document or something else?
Yes, single-threaded is the normal state. There might be tricks around it, though. You would need to ask someone with a bit more programming expertise. I would ask the question here:
Russ
Copy link to clipboard
Copied
Ch,
There might not be an active document. Maybe ask for the version (FP_VersionMajor)? Seems more reliable, although this is just a guess. I have not been in this situation before.
Russ
Copy link to clipboard
Copied
Thanks Russ.
I have tried to get the FP_UserName and it works.
However, because my code runs on a timer when the user selects text and do drag and drop then the API calls return nothing.
Is this because the FDK is single threaded or not?
Copy link to clipboard
Copied
Yes, single-threaded is the normal state. There might be tricks around it, though. You would need to ask someone with a bit more programming expertise. I would ask the question here:
Russ