Skip to main content
Americo Pinto
Inspiring
March 8, 2018
Answered

CEP InDesign : pass parameters from CEP extension to another CEP extension

  • March 8, 2018
  • 1 reply
  • 2026 views

Hello team,

I'm trying to send parameters from an InDesign CEP extension to another InDesign CEP extension.

Actually I use dispatch/addeventListerner prototype, the dispatch works, not the addeventlistener.

help is welcome.

regards

This topic has been closed for replies.
Correct answer Loic.Aigon

Hi Loïc,

pleased to see you !

i comfirm, the event type get the same name. The first extension call the "About to ..." extension by use the command

window.__adobe_cep__.requestOpenExtension().

Am I correct ?


Hi Americo,

Nice to see you around indeed

I supposed you saw this right (?) :

Before you send events, you might want to make sure the intended target extension has been loaded. You

can use the requestOpenExtension() method to force a load, then delay sending the event until the

load operation has completed by using setTimeout().

For example, if you are sending from a extension named Sender, and handling the event in an extension

named Receiver:

var csInterface = new CSInterface()

csInterface.requestOpenExtension("Receiver")

setTimeout( function()

{

var event = new CSEvent("cep.sender.event.message");

event.scope = "APPLICATION";

event.data = "Test message."

csInterface.dispatchEvent(event);

},

400);

HTH

Loic

See : https://wwwimages2.adobe.com/content/dam/acom/en/devnet/creativesuite/pdfs/CC14_Extension_SDK.pdf

Page 39

1 reply

Community Expert
March 8, 2018

Hi,

I think, the right forum for that question would be:

Extensions / Add-ons Development

Should a moderator move your question over?

Regards,
Uwe

Americo Pinto
Inspiring
March 8, 2018

Yes, thanks

Community Expert
March 8, 2018

Hi,

would you mind storing parameter/value pairs into app or document using the label property and doing this with methods insertLabel() and extractLabel() ?

Or you could do this with a helper text file that is accessible by both extensions.

Regards,
Uwe