On 01/15/2014 09:49 AM, Roberto Mosca wrote:
> Thanks Robert,
>
> but how to you retrieve it then programmatically? The instruction
>
> Jmol.evaluate(jmolApplet, "print {atomNo=" + atomNo + "}.label");
>
> does not work.
>
I wasn't aware of it but it seems that you need
'script("your_jmol_script_commands")' inside 'Jmol.evaluate'.
The following works for me with Jmol 14.0.1:
----- Jmol script ---------
select @1;
label "test 1";
----- Javascript ----------
var atomno="1";
var x = Jmol.evaluate(jmolApplet, "script('print {atomno=" + atomno +
"}.label')");
alert("LABEL="+x);
----------------------------
It should work similarly with the solution with your own array to store
the labels I proposed eralier.
Regards,
Rolf
--
Rolf Huehne
Postdoc
Leibniz Institute for Age Research - Fritz Lipmann Institute (FLI)
Beutenbergstrasse 11
07745 Jena, Germany
Phone: +49 3641 65 6205
Fax: +49 3641 65 6210
E-Mail: [email protected]
Website: http://www.fli-leibniz.de
Scientific Director: Prof. Dr. K. Lenhard Rudolph
Head of Administration: Dr. Daniele Barthel
Chairman of Board of Trustees: Dennys Klein
VAT No: DE 153 925 464
Register of Associations: No. 230296, Amtsgericht Jena
Tax Number: 162/141/08228
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users