User 9d72be7cd4
16-07-2007 22:05:44
Having trouble with SVG output.
Structures with shortcut groups have strange things happen with SVG output via the API:
When saving as image (SVG) via the Marvin Sketch window, they work great! Molecules without shortcut groups work fine, too.
When using the API for SVG (tobinFormat), however, the shortcut group doesn't seem to matter - it exports them expanded, messed up, or coordinates / angles are strange.
I've included a sample - a marvin file, an SVG from the menu, and an SVG via the API. I can provide further samples as well if it would help track down the problem.
What is going on here? Is there another method to better export SVG automatically via the API?
Thank you,
Nolan M.
Frontier Scientific
PS MarvinBeans we purchased work GREAT in our embedded application otherwise. Thanks for the great work!
Structures with shortcut groups have strange things happen with SVG output via the API:
Code: |
// Get molecule from MarvinSketch (ie, bean_73) var mol = elements.bean_73.getMol() // Convert to SVG var SVG_image = mol.toBinFormat("svg:scale40,H_hetero,atsiz.6,wireThickness.1,mono"); // Later javascript saves it to a file. |
When saving as image (SVG) via the Marvin Sketch window, they work great! Molecules without shortcut groups work fine, too.
When using the API for SVG (tobinFormat), however, the shortcut group doesn't seem to matter - it exports them expanded, messed up, or coordinates / angles are strange.
I've included a sample - a marvin file, an SVG from the menu, and an SVG via the API. I can provide further samples as well if it would help track down the problem.
What is going on here? Is there another method to better export SVG automatically via the API?
Thank you,
Nolan M.
Frontier Scientific
PS MarvinBeans we purchased work GREAT in our embedded application otherwise. Thanks for the great work!