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 more 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 present 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 editing Marvin OLE object in an MS-Office document, MarvinSketch can be opened by a couple of ways depend on the configuration of the OLE server.

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

In the C:\Program Files\ChemAxon\Shared\Marvin OLE folder, you will find various reg file that can help you to modify registry:

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

Installation of a regfile

Known Issues

Word Pad pops up a dialog indicating that Marvin OLE Server is not responding while inserting a new Marvin Document, or editing an exisiting one with MarvinSketch. This causes no harm or data loss, it is an invalid error message fired by Word Pad. After you complete the drawing process, and close MarvinSketch, press 'Retry' to close the dialog.

Open Office: Although Open Office is not supported, this OLE solution works partially on that platform. The following issues are known: copy from Open Office into Marvin does not work; the image of the embedded structure is not refreshed after editing without saving the whole office document.

 
Copyright © 1999-2010 ChemAxon Ltd.    All rights reserved.