Quantcast
Channel: Adobe Community : Popular Discussions - InDesign Server Developers
Viewing all articles
Browse latest Browse all 20709

How to get ISelectionManager

$
0
0
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();

Viewing all articles
Browse latest Browse all 20709

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>