Hi,<br /><br />I add a new javascript method to IDocument object, everything works ok and I can call the method through a jsx.<br /><br />var myDocument = app.open(myFile,true);<br />myDocument.dosomething();<br /><br />Here is a part of code<br /><br />ErrorCode CS4ServerScriptProvider::HandleEvent(ScriptID eventID, IScriptEventData* data, IScript* parent)<br />{<br />.....<br />...<br />// To get the IDocument I use this call<br />InterfacePtr<IDocument> document(parent, UseDefaultIID());<br />..<br />..<br />}<br /><br />My question is how to get the selection manager for this document, the following statement return always null.<br /><br />selectionManager = InterfacePtr<ISelectionManager>(Utils<ISelectionUtils>()->GetActiveSe lection()); <br /><br />also the following call returns null <br /><br />GetExecutionContextSession()->GetActiveContext()->GetContextSelecti on();
↧