Technical Support Forum Index
Technical Support Forum
Access ChemAxon scientists and developers here. For registration and login issues contact website support.
.net integration
To watch this topic for replies  Register (enables digests) or give email address:
Reply to topic
Display posts from previous:   
    View previous topic :: View next topic    
Author Message
dann

Joined: 13 Nov 2004
Posts: 66

View user's profile
Visit poster's website

Back to top
Link to postPosted: Fri May 29, 2009 8:20 amPost subject: .net integration Reply with quote

Hi, could you clarify for me what I actually need to use jchem from within .net. More specifically do I, in the latest release, need the JNBridge??

I am running on jchem 5.2

Dann

calinnaghi
ChemAxon personnel
Joined: 20 Aug 2008
Posts: 47

View user's profile

Back to top
Link to postPosted: Fri May 29, 2009 8:39 amPost subject: Reply with quote

Hi Dann,

Let me clarify this for you. Currently we have 2 solutions for .NET integration. One is using JNBridge and one is using IKVM. You can find some technical aspects about them on our website at http://chemaxon.com/NET_support_land.html

However we suggest you to use IKVM based solution because it has several advantages. If you will download and install our latest JChem .NET API from http://chemaxon.com/jchem/download.html (direct link http://www.chemaxon.com/download.php?d=/data/download/jchem/JChem__NET_API_5_2_02.msi) you will find some .NET examples with it.

Please tell me if you need anything else or if you have other questions.

Calin Naghi.

dann

Joined: 13 Nov 2004
Posts: 66

View user's profile
Visit poster's website

Back to top
Link to postPosted: Fri May 29, 2009 8:58 amPost subject: Reply with quote

Hi Calin,

Thanks for your reply, I will try IKVM approach...

Dann

dann

Joined: 13 Nov 2004
Posts: 66

View user's profile
Visit poster's website

Back to top
Link to postPosted: Fri May 29, 2009 9:01 amPost subject: Reply with quote

.. just a quick follow up.

I read in a privious post about the marvin applets and .net that this was not fully finished.

How is the best approach for the applets. Still to use the java applets??

(I am building a web application)

Dann

calinnaghi
ChemAxon personnel
Joined: 20 Aug 2008
Posts: 47

View user's profile

Back to top
Link to postPosted: Fri May 29, 2009 9:57 amPost subject: Reply with quote

Probably you want to have molecule editor functionality in your website right?

For a web application you will have to use molecule applet based editor. You will find out on our website how to include it in your page.

However in order to save the molecule on server or if you want to generate the molecule image on server, based on what the user has edited in applet you will have to do some JavaScript interaction.

I assume you want to use it in a ASP.NET website. In this situation you will have to do something like this:

1. Put the marvin applet editor (MSketch) in your aspx page.

2. Probably you will have a ASP.NET button which makes a submit of the current page(form). For that button attach a client JavaScript function (OnClientClick="getMoleculeFromApplet();" )

3. The "getMoleculeFromApplet" javascript function will look like

function getMoleculeFromApplet()

{

    document.getElementById("some_input_type_hidden_element").value = escape(MSketch.getMol("mrv"));

}

Remarks:

MSketch is the name of the marvin applet object.

If you create an ASP.NET hidden field you might want to use instead of "some_input_type_hidden_element" something like "<%=yourHiddenField.ClientID%>" - this is because normally the generated client id for a ASP.NET control is not the same with server side id.

4. On server side you get the molecule string in mrv format from "yourHiddenField.Value". Don't forget that this string was escaped in JavaScript so you have to make a Server.UrlDecode.

5. Now you should have the molecule string on server side in mrv format. So if you want to generate the molecule image you just have to follow the examples provided with JChem .NET API.

Hope this will help you...

Calin Naghi.

dann

Joined: 13 Nov 2004
Posts: 66

View user's profile
Visit poster's website

Back to top
Link to postPosted: Fri May 29, 2009 9:59 amPost subject: Reply with quote

Excellent! Thank you very much...

Dann

Reply to topic
Page 1 of 1


To watch this topic for replies   Register (enables digests) or give email address  
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum