Reply
New User
Posts: 3
Registered: ‎05-12-2011
0

.NET integration

[ Edited ]

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

Enthusiast
Posts: 21
Registered: ‎05-03-2011
1

Re: .NET integration

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.

 

--------------------------------------------------------------------------------------
This post does not necessarily reflect the views of my employer.

Nathan Ellenfield
ORISE Grantee- Immediate Office
National Center for Environmental Assessment
US Environmental Protection Agency
Research Triangle Park, NC 27711
New User
Posts: 3
Registered: ‎05-12-2011
0

Re: .NET integration

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.

Enthusiast
Posts: 21
Registered: ‎05-03-2011
1

Re: .NET integration

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/...

 

This tells you where you can deploy plugins:

http://community.thomsonreuters.com/t5/EndNote-API/Installation-Instructions-Notes-and-Disclaimers-f...

 

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/...

 

 

Hope this helps!

--------------------------------------------------------------------------------------
This post does not necessarily reflect the views of my employer.

Nathan Ellenfield
ORISE Grantee- Immediate Office
National Center for Environmental Assessment
US Environmental Protection Agency
Research Triangle Park, NC 27711
New User
Posts: 3
Registered: ‎05-12-2011
0

Re: .NET integration

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!

Visitor
Posts: 2
Registered: ‎10-01-2012
0

Re: .NET integration

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

Highlighted
Enthusiast
Posts: 21
Registered: ‎05-03-2011
1

Re: .NET integration

[ Edited ]

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.

--------------------------------------------------------------------------------------
This post does not necessarily reflect the views of my employer.

Nathan Ellenfield
ORISE Grantee- Immediate Office
National Center for Environmental Assessment
US Environmental Protection Agency
Research Triangle Park, NC 27711
Visitor
Posts: 2
Registered: ‎10-01-2012
0

Re: .NET integration

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.