05-13-2011 10:26 AM
Yes, this is possible. I'm working on a tutorial that shows how to easily do Interprocess communication using an EndNote plugin that makes use of the .NET library and will post that later. However, here's a short example:
You can include a namespace in the .NET library by::
#pragma managed using namespace System; using namespace System::ServiceModel;
You can then do:
String^ result = gcnew String("Hello!");
This uses the .NET string class rather than any of the many other types of strings that are available.
I hope this answers your question.
05-13-2011 04:55 PM
Thanks for replying. Looking forward to the tutorial.
So do you add the EndNote dll as a reference and then start calling the methods?
What I would like to do is just passing in a search string and get the results back.
05-16-2011 09:30 AM
Hey, glad to be of help!
When you download the API, you get a collection of header files. You have to add the location of the folder with these header files to your include path in Visual Studio. Then, you have to implement the Init and Exit methods specified by the EndNote API. Then, you build a DLL with your plugin and place it in one of EndNotes plugin folders so that EndNote can load it.
If you don't have the API with the documentation and the headers, you can get it here: http://community.thomsonreuters.com/t5/EndNote-API
This tells you where you can deploy plugins:
By the way: I posted my tutorial here. In it, you can see how to use .NET in an EndNote plugin (though, it doesn't include all of the source, just the most relevant parts): http://community.thomsonreuters.com/t5/EndNote-API
Hope this helps!
10-02-2012 08:39 AM - edited 10-02-2012 08:40 AM
I'm certainly no expert on this type of thing, but I'll attempt to answer.
As far as I know, they portion that allows you to hook into the EndNote plugin API must be written in (unmanaged?) C++. Additionally, I believe you must implement any callbacks and call any EndNote API functions in C++.
However, you can write your own functionality in any of the .NET languages and call these from the plugin code written in C++. (and of course, you can also call managed C++) That's basically what I did a while back. I wrote a library in C# and used it from both EndNote and a Word plugin.
Hopefully someone can correct me if I'm wrong.
10-02-2012 09:44 AM
That's what I thought.
So in reality the API is not an Endnote API but more an API for the plugin model of Endnote. That would mean for any internet facing integrations we would need an instance of Endnote running somewhere accessible to the website. Not ideal but thank you.