Alternative display updates for computation results: Textbox vs Notebook?
s.r.chinn
beam waist = 0.5mm
, with the numerical display changing automatically from run to run. The simplest method I have found is to create an empty graph and add a many-element Annotation Textbox, with the numerical values obtained from dynamic text format with global variables, such as Beam waist = \{BeamWaist}mm
. This has the advantage of being simple to set up, and often not requiring (but allowing) an explicit formatting of the number Beam waist = \{"%2.2f", BeamWaist}mm
. The practice of using many such global variables is mildly deprecated by WaveMetrics, so I thought that using a Notebook for this purpose ought to be more appropriate.However it appears that dynamic annotation cannot be used in this way in Notebooks. The only alternative I could find was the cumbersome process of creating a custom Notebook template, and saving it as an .ifn file in the Igor User Procedures folder. Then a separate function has to take the variable input numbers (as strings), open the Notebook template and find the text location for each corresponding variable, and replace it with the input string of the number. This is all described in "Updating a Report Form" (Manual page III-27). Is there another technique that is any easier? My wish would be to add dynamic escape codes to Notebooks so they could behave similarly to Annotation Textboxes.
Presently using IP7.08 64-bit, Windows 7
Not that I can think of.
Except possibly that you can create an Igor-object picture from a graph and update that picture in the notebook.
DisplayHelpTopic "Using Igor-Object Pictures"
February 7, 2018 at 07:48 am - Permalink
February 7, 2018 at 07:54 am - Permalink
You are correct; ValDisplay controls could be used to show the parameters, but using _NUM inputs requires a function to update the controls with local variables. Global control variables would update automatically, but creating the control panel is more work than filling in a single graph Annotation Textbox.
February 7, 2018 at 08:58 am - Permalink
***
Current Values
End Current Values
***
Dump the values as a string in to a string variable. Search the notebook, cut the block, and replace it.
Alternatively, create a panel with (UGH) globals. Capture a snapshot of the panel and replace it in the notebook.
Alternatively, create a string wave. Display it in a table. Repopulate the variables as needed.
--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAH
February 7, 2018 at 09:43 am - Permalink