I understand that there is no straight way to do this. But the good news is- it is possible.
From your FDK client it is possible to get the docid and pass it on to the extendscript. Now with this docid in hand you could traverse all open documents in your FrameMaker session and match the open documents in the session for this docid. An that's all. You have the document object to manipulate in the extendscript interface.
Thanks for the reply. I see where you are going with this... I'm assuming you are talking about traversing document IDs using the 'id' property of a document object, as in:
That certainly would work, if the 'id' property is reliable as an F_ObjHandleT integer equivalent. Do you know that it is? I didn't see it in the documentation and the auto-complete feature doesn't seem to present it as an option. In my brief experiments, though, it seemed to work.
In the Extendscript Toolkit's databrowser I can see many items that have an undocumented 'id' property. I am not sure why it is undocumented but it looks like this is the handle that is being used for many settings that are defined in linked lists, such as Color, CondFmt, ElementDef, etc etc. There does not seem to be another way to get the right color etc except by traversing the linked list and matching its 'id' to the integer that is used in the setting. I have used this several times in my scripting and so far it has always worked.
In response to your question: "That certainly would work, if the 'id' property is reliable as an F_ObjHandleT integer equivalent. Do you know that it is?"
Yes, it is reliable and is the F_ObjHandleT integer equivalent.
OK then, I believe this question is answered. While the solution takes a few lines of code, it is not overly burdensome. Thanks to all who took the time.