Function to Read Ruler Settings in Notebook
jjweimer
I would appreciate having a way to read any/all of the current ruler settings in a notebook. A readruler function comes to mind.
mag = readruler(notebook,"mag")
units = readruler(notebook,"rulerUnits")
rmargin = readruler(notebook,"marginright")
...
units = readruler(notebook,"rulerUnits")
rmargin = readruler(notebook,"marginright")
...
I have a utility panel that dumps graphics to a notebook. I can scale the graphics from their raw input size. I would however like to have a way to scale graphics to the current notebook page size (e.g. HALF of the notebook page size rather than half of the raw image size).
Ach! I cannot edit. I will instead change this. A far easier path is to have the option as below.
Here, pscaling is a factor (in percent) that scales the picture TO THE CURRENT NOTEBOOK RULER WIDTH. In cases of conflict, scaling={%,%} overrules pscaling.
This would solve my problem directly without further programming needs to read rulers.
May 3, 2019 at 02:02 pm - Permalink
For Igor8, I added an undocumented feature to aid in internal testing of Igor. It works like this:
•GetSelection notebook, Notebook0, 4+16; Print S_selection // Get information about the current ruler
Since it is undocumented, this is subject to change.
May 5, 2019 at 09:04 pm - Permalink
In reply to For Igor8, I added an… by hrodstein
Thanks. I think the better step is to have a scaling factor that is based on the margins of the current ruler. One could then do this ..
I use pscale but perhaps rscale would be better too.
May 6, 2019 at 06:05 am - Permalink