Please enable JavaScript to view this site.

DAQFactory User's Guide

Navigation: 7 Pages and Components

7.14 Page Functions / Variables

Scroll Prev Top Next More

There are several functions for performing actions and accessing parameters with pages programmatically.  All start with "Page.".

Variables:

Page.ScreenWidth / Page.ScreenHeight:

Read-only.  Returns the width or height of the page area of the screen in pixels.  These values change with both the overall DAQFactory window size, as well as with movement or resizing of any docking menus or windows.  These functions are usually used with the Scaling variable to make it so that pages automatically scale.

The two variables below are deprecated and remain for backwards compatibility.  Please see the section on Creating Popup Windows for more detail.

 

Page.strCurrentPage

Page.Scaling

Functions:

Page.Capture(specifier, filename, width, height):

Captures the specified page to the jpeg file specified in filename. Don't forget .jpg in your file name.  Width and height are optional and specify the size of the jpeg.  The specifier is the name of the page to capture.  

To specify overlaid pages, simply add them together:

"Barrels+Diagram"

would create a jpeg of Barrels and Diagram overlaid on top of each other.  The pages are drawn in the order listed, putting the last listed page on top.

You can also crop your pages to only the important parts:

http://www.mydomain.com/Barrels-120,134,348,322

would use the area of the page Barrels with an upper left corner of 120,134 (x,y) and a lower right corner of 348,322.  The coordinates on a page are displayed in the status bar as you move your mouse, unless of course you are over a graph, in which case the graph coordinates are displayed.  Cropping in this way overrides any width/height values provided in the function call.

This function is only supported in versions that support the networking.  

Page.PrintPage(name):

Prints the given page.  Will switch to the page first and then print it.

Page.PrintPageDirect(name, [file name]):

Prints the given page.  Will switch to the page first and then print it.  Unlike PrintPage, which will prompt the user for the printer settings, PrintPageDirect uses the current printer and does not display any window.  File name is used when your default printer is the Adobe Distiller.  If you specify the file name, the distiller will not ask the user for a file name, but instead will automatically generate the given file.  This parameter only applies if the default printer is set to the Adobe Distiller.

Page.PrintSetup():

Displays the standard windows print setup window

Page.UpdateEdits():

This function causes all the edit and combo box components to replace their contents with the current value for their OutputTarget, basically displaying what the current value is.  This applies to all pages.

Page Specific Variables / Functions:

Individual pages also have variables and functions.  They are accessed by entering "Page.PageName." where PageName is the name of the desired page you'd like to work with.

Variables:

Page.PageName.Interval:

Sets or retrieves the refresh rate of the page

Page.PageName.BackColor:

Sets or retrieves the background color of the page

Functions:

Page.PageName.UpdateEdits():

This function causes all the edit and combo box components to replace their contents with the current value for their OutputTarget, basically displaying what the current value is.   Unlike Page.UpdateEdits(), this function only applies to components on the given page.

The four functions below are deprecated and remain for backwards compatibility.  Please see the section on Creating Popup Windows for more detail.

 

Page.PageName.ClosePopup()

Page.PageName.PopupModal()

Page.PageName.PopupModeless()

Page.PageName.WaitForClosePopup()