Persisting "My Templates"

User 8d3767b032

13-07-2007 19:09:15

We have a number of applications that use Marvin Sketch. It is possible for users to create custom templates using Insert->Template->My Templates.


However, when the user exits the application, the templates are gone. Is it possible to make "My Templates" persistent between sessions?





Thanks,





Pat

User 870ab5b546

15-07-2007 02:35:29

The administrator can create new templates that all users can use. The template files go in ~chemaxon/marvin/templates (where ~ is the Marvin directory) and have an extension of .t or .mrv. I'm posting two examples. (I had to change the extension of one from.t to .txt because this forum wouldn't let me post it otherwise.)





Last I saw this question answered, it was not possible for users to save their own templates, but perhaps things have changed since.

User 8d3767b032

16-07-2007 15:47:13

Thanks for info on custom templates, but that is not really what we need. Our users would like to be able to save templates that they have added using Insert->Template->My Templates. Having the ability to create templates is not all that useful if the templates don't persist between sessions. Anyone from ChemAxon care to chime in on this one?

ChemAxon 7c2d26e5cf

16-07-2007 18:50:21

My Templates are stored in the user's home directory (HOME\chemaxon on Windows or HOME/.chemaxon on other platforms). It is saved into "marvin.properties" among the user private Marvin settings.


My Templates (like any display settings) are saved at exiting the application and read at starting the sketcher. It will be available in those sessions that are opened after the current one is closed.

ChemAxon 7c2d26e5cf

18-07-2007 10:37:36

We plan the following changes in the handling of my templates:


- Save any changes (add/remove/edit) in the my templates list immediately.


- Create a "Refresh" button (or menu item) in the My templates window to reload my templates file.





I hope the above modifications would be helpful to users to synchronize my template lists between sketcher sessions.


Pat, what do you think about it?

User 8d3767b032

19-07-2007 23:05:40

Tamas, the changes sound really good. However, it doesn't appear that "My Templates" persists between sessions. Here's what I did





1. Start Marvin sketch


2. Sketch a structure


3. Insert->Templates->My Templates


4. Drag the structure to My templates


5. Exit Marvin sketch





6. Restart Marvin sketch


7. Insert->Templates->My Templates


My Templates is empty





$HOME/.chemaxon/marvin.properties looks like this





#Marvin parameters


#Sun Jul 15 20:25:06 EDT 2007


sketchImplicitH=hetero


sketchMolbg=\#ffffff


tmpls128=*My Templates*chemaxon/marvin/templates/custom.t





I'm using Marvin 4.1.9 under Mac OS-X 10.4.10 with Java 1.5.0_07

User 8d3767b032

20-07-2007 11:29:44

I tried this on a Windows machine this morning and the templates in "My Templates" do persist. This appears to be a Mac specific issue. The templates in "My Templates" do not persist under OS-X. Tamas, I would appreciate if you could verify this.

ChemAxon 7c2d26e5cf

23-07-2007 14:34:35

Thanks for the details. The problem is already clear me.


Indeed, it is a Mac specific issue.


Quit MarvinSketch (command+q) is a standard OS X command that terminate the program immediately. In contrary of "Close" (that you can find in the "File" menu), Quit does not save any settings.


I suggest to use the File/Close operation to close application if you would like to preserve settings.

User 8d3767b032

24-07-2007 14:18:37

Is there an API call we can use from our applications to make sure the templates are saved?

ChemAxon 7c2d26e5cf

24-07-2007 15:04:56

Yes, you can use chemaxon.marvin.beans.MarvinPane.exit() to save settings and close windows.