-
1. Re: How to open an extension programatically?
dinghui Jan 21, 2014 11:29 PM (in response to maddy1907)Hi,
Which Adobe Application are you using?
You will need to use the native SDK of the application. And also, the application SDK must exposes a header file named PlugPlug.h. If the header file is available, then you can use the PlugPlugLoadExtension API to load an extension with specified extension ID.
-
2. Re: How to open an extension programatically?
maddy1907 Jan 21, 2014 11:46 PM (in response to dinghui)Oops I forgot to mention I'm using developing a plug-in in indesign and coupling it with an extension. Where exactly is the extension ID? and is there an sample which illustrates this? I have not packaged my extension yet. I'm making a html5 extenion
-
3. Re: How to open an extension programatically?
dinghui Jan 21, 2014 11:59 PM (in response to maddy1907)Hi,
In your extensions's root folder, open CSXS/manifest.xml, then you will see the extension ID. Or, when you are creating your extension in Extension Builder, there should be step asking you to give the extension an ID.
I will involve guys from the InDesign SDK team to help you with the native InDesign Plug-in question.
-
4. Re: How to open an extension programatically?
maddy1907 Jan 22, 2014 12:11 AM (in response to dinghui)Thanks a lot, I guess it's within the tag ExtensionBundleId= "com.example.myextensionname".
I can find the code for adding a custom event listener to my extension but cannot find a way to load it.
-
5. Re: How to open an extension programatically?
Timothy Brand-Spencer Jan 22, 2014 9:02 AM (in response to maddy1907)I work on the InDesign SDK. I'm not sure exactly which version of InDesign you are developing plug-ins for, but given you are also creating HTML extensions I assume you are using InDesign CC 9.1 or later.
There is no public API in InDesign for you to launch an extension from a plug-in. It is more common for the reverse of what you are talking about: an extension (with menu item and UI) that calls into native plug-in APIs.
However....
In InDesign CC 9.0 we exposed some plugplug APIs for the first time, enabling you to construct and dispatch CSXS events from native InDesign plug-ins. The file is: <sdk>/source/public/interfaces/ui/ICSXSPlugPlugEventHandler.h.
We also added a new sample to the SnippetRunner sample demonstrating how to use the new plugplug APIs (see: <sdk>/source/sdksamples/codesnippets/SnpHelloCSXS.cpp).
More recently I wrote a blog post about communication between native plug-ins and HTML extensions, here: https://blogs.adobe.com/indesignsdk/html-extensions-in-indesign/.
We might consider exposing this functionality in a future release. If you are a member of the pre-release program perhaps you could raise a bug about this? If not I can raise the subject internally. If this did happen, it wouldn't be overnight so I would definitely try an alternative workflow for your plug-in/extension in the mean time. Can you share why you wish to launch the extension from the plug-in and not the other way round? Perhaps we can help you find a workaround.
Tim
-
6. Re: How to open an extension programatically?
maddy1907 Jan 22, 2014 9:50 PM (in response to Timothy Brand-Spencer)Hi Tim,
Thanks for the quick reply. I've designed a login dialog in Indesign sdk. On a successful login, I need to bring up my extension panel (based on credentials)which is quite complex, so I decided to make a html5 extension of it.
Yes, I'm a part of the prerelease program.Thanks for the link, I had already implemented that into my plug-in.
Edit: Feature filed.
ID: 3697891
This is my first feature request. I hope I've done it in the correct manner.
-
7. Re: How to open an extension programatically?
pierrel Feb 25, 2014 6:31 AM (in response to maddy1907)Hi!
Have you any estimation as to when this feature will be implemented? This is actually preventing me from making my plug-ins work with InDesign CC...
-
8. Re: How to open an extension programatically?
Caleb Clauset Sep 17, 2014 11:41 AM (in response to Timothy Brand-Spencer)Our desire (at Typefi) is to have all of our plug-ins/extensions be grouped under the same Windows submenu (e.g., Windows → Typefi) rather than the C++ plug-ins appearing in one location and the HTML extensions appearing elsewhere. If it's not possible to relocate the HTML extension directly, then a fallback would be a stub C++ plug-in that would appear in the correct location that simply launch the HTML extension (panel).
-
9. Re: How to open an extension programatically?
maddy1907 Sep 17, 2014 11:09 PM (in response to Caleb Clauset)I noticed that under Help>What's New, the palette that appears is a modeless dialog which is HTML5 extension. Therefore there's surely a way to change the menu item's location other than the extensions location but probably it's not exposed to the third party developers.
This was the reply I got from adobe on 3rd March 2014
[Internal 3/10/2014 3:25:33 AM] Thank you for logging this enhancement request. We are adding it to our database of feature requests and presently closing it from the bug-base.
-
10. Re: How to open an extension programatically?
Timothy Brand-Spencer Sep 22, 2014 4:29 AM (in response to maddy1907)maddy1907 We have made the APIs you need public ;-). They will be available in the next InDesign SDK release, but you will be able to access them sooner than that if you still have access to the pre-release site. The file you will need is <SDK>/source/public/interfaces/ui/ICSXSPlugPlugExtensions.h and the two APIs are LoadExtension(...) and UnloadExtension(...). Hopefully pierrel will find this useful too.
-
11. Re: How to open an extension programatically?
maddy1907 Sep 22, 2014 5:59 AM (in response to Timothy Brand-Spencer)Thanks Tim. This will be really helpful!
-
12. Re: How to open an extension programatically?
Timothy Brand-Spencer Sep 22, 2014 7:50 AM (in response to Caleb Clauset)Regarding the question fromCaleb Clauset..
If you want to group menu items for extensions together in your own sub-menu, try this:
<Menu Placement="'Main:&Window:.&Typefi',100.0,'KBSCE Window menu'">Menu Item</Menu>
You can also use this menu path in your native plug-ins so that, if they have menus, those menus appear in your own menu too.
Hope this helps!
Tim


