Demo Setup Tools

Background

This procedure file is designed to help package developers create minimalistic, self-contained demonstrations from their experiments.

A demonstration is an experiment that has at most one graph and at most one panel. It should run with no Igor Pro menus. It should provide users with a way to layout the graph + panel or capture the graph + panel to a notebook.

This procedure file provides function calls to Send to Notebook or Send to Layout. It provides function calls to make a demonstration that hides all Igor Pro menus and shows only a Demo menu with Send to Notebook, Send to Layout, and Quit. Developers can add other menus as desired.

You can set the layout to be portrait mode with a switch pmode=1. You can set the layout to collect more than one graph with a switch allgraphs=1.

See the ReadMe in the release ZIP archive for guidelines and instructions. In a nutshell ...

  • Create your demo package without or with an external procedure file (only one external procedure file is supported). Assure that it works without using the tools.
  • Use the #include "Demo Setup Tools" call in the header to the main procedure window. This gives a new menu option for your demonstration.
  • Develop functions in your procedure to respond to new menu calls Layout Demo, Notebook Demo, and Quit.
  • SAVE your experiment.
  • In the command line to your experiment, type "DemoSetupTools#convert_todemo(...). Various options are input to this function (see the help file).
  • At the subsequent prompt, save a WORKING COPY (non-demo copy) of the experiment.
  • When the conversion is finished, delete the entire history and save the experiment. The experiment should now be a fully self-contained demonstration.

Hidden Features

The graph is protected from tampering by using a ModifyGraph ... UIControl=uic command, with uic = 4095. Put a variable at the root folder level called uic and give it the value that you would prefer (uic = 0 means no protection).

The page size for layout is letter sized landscape. The settings use values pgwidth, pgheight, and pgmargin in set up. Put these values variables at the root folder level to overwrite the defaults for letter page size.

The fraction of the page that is used for the graph in layout mode when the layout has both a graph and panel is set by a value gfrac. Put this as a value at the root folder level to over the default (gfrac = 0.75).

A global variable plock can have settings to change the panel noEdit and fixedSize state: 1 (lock), 0 (make no changes to current state), or -1 (unlock).

When demomode does not exist, the demo mode will never become activated. To switch on demo mode, use demomode = 1. To switch off demo mode (and recover all Igor menus), set demomode = 0 and force Igor Pro to recompile.

The procedure includes a function command Freeze_Traces(...). This function will create copies of the traces on a graph in a "frozen" state. You can vary the original traces while the frozen traces remain fixed.

See the ReadMe file for further comments.

--

I extend my gratitude for support from WaveMetrics to help deconstruct the commands needed to make this package work as it does.

Images:

picture of demonstration to set up

Project Details

Current Project Release

Demo Setup Tools v2.20

Release File: Demo Setup Tools v2.20.zip
Version: 2.20
Version Date: Tue, 05/02/2023 - 06:30 pm
Version Major: 2
Version Patch Level: 20
OS Compatibility: Windows Mac-Intel
Release Notes:

Bug Fixes - minor

New Features

  • Includes a function Freeze_Traces(...). The benefit of this function is to allow you to set a static snapshot of traces on a graph and then vary input parameters to see how the variations change the positions or shapes of the curves relative to the snapshot.
View All Releases

Forum

Support

Gallery

Igor Pro 9

Learn More

Igor XOP Toolkit

Learn More

Igor NIDAQ Tools MX

Learn More