default output format of MarvinPane

User e7455c8684

12-06-2007 19:18:36

I would like to change the default type from .mrv to .sdf, and I tried to use setFormat method with no success. I tried setFormat("*.sdf"),setFormat(".sdf"), and setFormat("sdf"). What's the correct syntax? thanks.

ChemAxon 7c2d26e5cf

13-06-2007 14:30:18

I've not found any error in MSketchPane.setFormat(String) method.


It works fine for me. I've tested it with the latest Marvin release (4.1.8), with the help of the following example (see the attachment).





Draw something in the attached example then minimize and restore the window (the format will be updated). You can check it by opening the Edit source window.





By the way, this is the correct syntax:


Code:
sketchPane.setFormat("sdf");

User e7455c8684

13-06-2007 15:23:22

Thanks for the answer, but what I really mean is when user click "File->Save", the default format will be "sdf" instead of "mrv" in the JComboBox at the bottom of the Dialog.





Jun
Tamas wrote:
I've not found any error in MSketchPane.setFormat(String) method.


It works fine for me. I've tested it with the latest Marvin release (4.1.8), with the help of the following example (see the attachment).





Draw something in the attached example then minimize and restore the window (the format will be updated). You can check it by opening the Edit source window.





By the way, this is the correct syntax:


Code:
sketchPane.setFormat("sdf");

ChemAxon 7c2d26e5cf

19-06-2007 13:45:51

Indeed. Currently, you can not control programatically the default output format in the Save dialog.


In default, it is MRV, since it is the more descriptive format.


If a molecule has been loaded from a structure file (e.g an SD file), the output format in the Save dialog will be the same than the format of the input file (in this case: sdf).


But we are planning to implement a defaultSaveFormat property to solve this issue.

ChemAxon 7c2d26e5cf

10-07-2007 10:05:46

The defaultSaveFormat property has been implemented. It will be available in next release (4.1.11).

User e7455c8684

10-07-2007 17:05:15

Thanks! This is going to increase the usablity of our programs.


What's the corresponding JChem Version? We are using jchem_3.2.8.jar
Tamas wrote:
The defaultSaveFormat property has been implemented. It will be available in next release (4.1.11).

ChemAxon 7c2d26e5cf

10-07-2007 17:08:01

JChem 3.2.9 will include this feature.