Marvin OLE User's Guide

Contents

 

Introduction

Marvin OLE is the ChemAxon solution for Microsoft's Object Linking and Embedding (OLE) technology. It is supported by Windows operating systems. Marvin OLE offers an easy way to embed Marvin Sketch drawings into other applications, like Microsoft Office Family products. Embedded Marvin Documents can be edited in-place with a fully functional Marvin Sketch.

Word Documents, Excel Sheets, and many other files containing embedded Marvin Documents are easily distributable. Even people who do not have Marvin and JChem_NET_API installed can access the content as an image, however, to edit the Marvin Document itself, they must have a properly installed Marvin with OLE support.

 

Install and Uninstall

Installation

The OLE server is bundled in JChem_NET_API installer, when JChem_NET_API is installed it automatically register OLE server too. Administrator privileges are required for the installation since the installer writes the Windows registry. OLE server does not require the presence of Marvin Beans package. If it is not available it uses the .NET version of MarvinSketch (that is also part of the JChem_NET_API as the OLE server OLE server). If Marvin Beans package has been installed, OLE server prefers the Java based Marvin by editing OLE objects.

When you install Java based Marvin Beans package, the installer strores a reference in the Windows registry about the location of the MarvinSketch application. OLE server check this reference when try to look-up it.

The Marvin Beans installer also includes the JChem_NET_API.msi file and launch it automatically during the installation process. It means that you do not have to download or register any extra resources to setup OLE server since installer does it automatically.

If you do not use Marvin Beans installer but you need both Marvin and OLE server, you have to do the followings:

If installation has been successful, you will find OLE Server resource in the
C:\Program Files\ChemAxon\Shared\MarvinOLE folder.

Uninstallation

When you uninstall JChem_NET_API, OLE server is also unregistered and the C:\Program Files\ChemAxon\Shared folder is also deleted (where OLE server resources was stored).

In this case, Marvin OLE support will not be available for Marvin.

When you uninstall Marvin Beans package, JChem_NET_API uninstaller is also invoked unless other products still keep reference to it.

Of course, uninstallation also requests administration privileges.

Administrator privileges

Windows 2000/XP: Most users have got administrator privileges in default (unless the system administrator restricts it). If you have got full control on your machine (install anything freely), you have administrator rights. In this case, installer/uninstaller will run definitely with admin privileges.

Windows Vista: Vista security policy is more strict than earlier Windows versions. If a user has got administrator rights, it does not mean that he can run everything with these privileges. In default, all programs run without extra rights. To run a program with administrator privileges, you have to select Run As Administrator by launching (right-click on the icon of the application and choose Run As Administrator option). After selecting this option, Vista will ask for confirmation to run the application with high privileges, click Allow. The application will run in admin mode.

Although ChemAxon installer/uninstaller does not require admin rights, it detects the highest running level and tries to run in administrator mode automatically (if it is possible). If the installer has got the proper rights, it does registration/unregistration of OLE server in the background during the (un)installation process.

 

How to Use

Simply select your drawing, or any part of it and copy it to clipboard (Ctrl+c). The selection can be pasted into any OLE-capable application, like Microsoft Office Family (if OLE support is enabled).

This feature also works in a reversed way: select an embedded Marvin OLE document from your Excel Sheet or Word Document, copy to the clipboard (Ctrl+c), then use the paste function (Ctrl+v) at your MarvinSketch to retrieve the structure.

IF OLE copy does not work for you, please check the followings:

 

Customize Marvin OLE editing mode

When you would like to edit a Marvin OLE object in an MS-Office document, MarvinSketch can be opened by a couple of ways depending on the configuration of the OLE server.

By default, when OLE object is edited the editor opens embedded into the MS-Office application. If you would like to see MarvinSketch in a standalone window during editing the OLE object, you have to modify OLE server settings in the registry.

In the C:\Program Files\ChemAxon\Shared\MarvinOLE folder, you will find different registry entries that can help you to modify the registry:

Just install the desired regfile to modify the edit settings of the OLE server as described below.

Installation of a regfile

UI settings for Standalone mode

Marvin OLE represents a multi-document interface, which means that the users can edit more than one single document at a time. When using standalone mode all opened documents can be seen in child windows hosted in a main window frame.
From version 5.12 a new setting is avilable for both administrators an users: for setting that these OLE documents should be opened in maximized window state. (Maximized window state is when the active document window overlaps, covers all other document windows.)
Alt+Tab helps switching among all opened documents as normally, but the active document child gets into focus with full size in the host.

Redirecting other Vendors' OLE objects to Marvin OLE

From version 5.7 Marvin OLE started supporting conversion of other Vendors' embedded OLE objects to Marvin OLE. This means an in-place migration of OLE contents generated by other chemical OLE objects. The list of currently supported OLE: Installation of this capability requires administrator skills and privileges strictly. In the C:\Program Files\ChemAxon\Shared\MarvinOLE folder, you will find the relevant registry file (Install_ISIS_Symyx_OLE_Redirection.reg or Install_ChemDraw_OLE_Redirection.reg) which helps you to modify the registry accordingly. The administrator should do the following steps to get this feature installed properly: If the installation of this feature was successful the third-party OLE content will be converted during the OLE editing process.

Important!
After executing the Install_ISIS_Symyx_OLE_Redirection.reg , or the
Install_ChemDraw_OLE_Redirection.reg file
your OLE object will be opened by Marvin in the future.

In each case when a user is about to open the third-party OLE content, an automatic confirmation dialog will be dropped to get this conversion confirmed. (If a structure is selected and copied in SymyxDraw, when it is pasted to an MS Office document, the confirmation dialog appears, too.)
On the dialog, the user should allow (or disallow) the redirection operation and also can apply his decision for all similar cases (check box): how should the same OLE type be edited in the future. If the checkbox was selected, the confirmation dialog will not be dropped for that OLE content type any more. The decision is stored for each OLE content type in the following registry path: HKEY_CURRENT_USER\Software\ChemAxon\MarvinOLE\Settings
If the appropriate registry key (e.g. the \SKCConversion) is deleted, the confirmation dialog will appear next time again at editing the third-party OLE.

Redirect file associations to MarvinView

File associations can be modified according to the standard Windows procedure, as described above in the Installation of a regfile paragraph.
But there is another way to redirect the .SKC file associations (from IsisDraw or SymyxDraw) or the .CDX file associations (from ChemDraw) to MarvinView: on installing (or reinstalling) MarvinBeans, the 'Allow file associations' checkbox should be checked, and on the next, 'Select File Associations' popup the 'Isis/Draw molecule file (*.skc)' or/and the 'ChemDraw chemical structure exchange file (*.cdx)' checkbox should be checked.
This file association-redirection can be reverted when MarvinBeans is reninstalled again, and the 'Isis/Draw molecule file (*.skc)' or/and the 'ChemDraw chemical structure exchange file (*.cdx)' checkbox remains unchecked (default) - or when MarvinBeans is uninstalled.