.NET integration

Hi,

Is it possible to use the EndNote API in .NET?
If so, are there any samples that could help me getting started?

Thanks,
Erik

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.

1 Like

Hi,

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.

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/The-EndNote-RSServices-API-is-now-available/td-p/13881

This tells you where you can deploy plugins:

http://community.thomsonreuters.com/t5/EndNote-API/Installation-Instructions-Notes-and-Disclaimers-for-EndNote-Plug/td-p/18357

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/EndNote-Interprocess-Communication-Tutorial/td-p/19471

Hope this helps!

1 Like

Awesome! I will play around with it next week. Might get back with a few more questions.

Thanks for writing the tutorial, really appreciate it!

Does the plugin have to be written in C++?

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.

1 Like

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.

my regards for all information, it helped me alot