Metasys System Analysis Tool User’s Guide A-1

Appendix A M-SAT ActiveX Control

Introduction M-SAT can run as a standalone program or in an ActiveX document. This appendix describes how to get started using M-SAT ActiveX control. The ActiveX control version of M-SAT is a software component that can be invoked by any container application for example, M-Graphics. This version allows the user to take the view and place it anywhere on the graphic. ActiveX technology supports methods and parameters to perform all tasks.

© November 1, 2001 Johnson Controls, Inc. www.johnsoncontrols.com Code No. LIT-655554 Software Release 5.0 A-2 Metasys System Analysis Tool User’s Guide

Key Concepts

ActiveX Applications A loosely defined set of technologies developed by Microsoft Corporation. ActiveX technology is an outgrowth of two other Microsoft technologies called Object Linking and Embedding (OLE) and (COM). ActiveX technology is not a programming language but rather a set of rules about how applications share information.

ActiveX Control The ActiveX control represents a specific way of implementing ActiveX technologies. They can be used to provide limited functionality of an application, such as M-SAT, without having to download the entire program to a machine.

M-SAT in ActiveX Control An ActiveX control allows the display of M-SAT graphs in M-Graphics displays or using other ActiveX compliant applications such as 4.0. Using the M-SAT ActiveX control, a user can put multiple M-SAT images into an M-Graphics display. When an M-SAT ActiveX control is created in an M-Graphics display, the information for the M-SAT graph is saved in the M-Graphics document. Therefore, instead of having a separate .ana file for the M-SAT display information, the M-SAT information is accessed when the M-Graphics document (.gdf file) is opened. A right mouse click allows the information to be stored as an .ana file within M-Graphics. Note: For more information on ActiveX control, refer to Microsoft Programmer’s Guide Version 4.0 (or Later) or Understanding ActiveX and OLE: A Guide for Developers & Managers written by David Chappell. Metasys System Analysis Tool User’s Guide A-3

Expanded Right-click in M-SAT ActiveX Control When an M-SAT display ActiveX control is inserted in an ActiveX container application, some of the menu options that are present in the M-SAT program menu bar are accessed through an expanded right-click menu (Figure A-1). The menu commands are described in Table A-1.

Figure A-1: ActiveX Pop-up Menu

Table A-1: Menu Operation Command Description New Creates a new M-SAT display. Open Opens an existing M-SAT display. Save Saves an M-SAT display. Save As Saves M-SAT information in another file name. Edit M-SAT Opens M-SAT Definition dialog box. Show Markers Shows/hides the M-SAT markers. Enable Stop Stops Data VCR when bar value is out of range. Show Rate Shows/hides the Rate of Change Indicator. Zoom Displays M-SAT information in bigger size. UnZoom Displays M-SAT information in normal size. About Displays program information, copyright, and version information. A-4 Metasys System Analysis Tool User’s Guide

ActiveX Control Properties The following are attributes used for ActiveX control in custom built applications. The ActiveX control version of M-SAT supports the properties shown in Table A-2.

Table A-2: ActiveX Properties Property Description BackgroundColor Allows the background color of M-SAT to be set. The default value is white. NormalBarColor Allows the bar color to be set when the value is in normal range. The default value is green. BelowNormalBarColor Allows the bar color to be set when the value is below the normal range. The default value is blue. AboveNormalBarColor Allows the bar color to be set when the value is above the normal range. The default value is red. AxisColor Allows the color of the rectangle that encloses the bar, the flashing bar outline, and the display range line of the bar to be set. The default color value is black. OfflineBarColor Allows the bar color to be set when the status of the value is Data Not Available. The default color is grey. Metasys System Analysis Tool User’s Guide A-5

ActiveX Methods The ActiveX control version of M-SAT supports methods to perform all the below operations. These methods are shown in Table A-3.

Table A-3: ActiveX Methods Method Description ConnectToServer Connects to an OPC . EditM-SAT Allows new analog bars to be created, existing bars to be modified, and color/font information to be edited through the M-SAT Definition dialog box. GetErrorLineNumber Returns line number where an error has occurred while loading an .ana file. GetStopEnabledStatus Returns when stop feature is enabled or disabled. GetMarkerStatus Returns when markers are displayed or not displayed. GetPrinterPages Returns total number of pages to be printed. GetMSATTitleForServer Returns the title of currently loaded M-SAT display. GetMSATTitle Returns the title of the currently loaded M-SAT display. GetMSATModifiedStatus Returns M-SAT display since the display was last loaded. GetROCStatus Returns M-SAT Rate of Change. GetDataVCRServerStatus Returns the connected server for JCI.DATAVCR. IsMSATZoomed Returns when M-SAT is zoomed or unzoomed. LoadM-SATFromFile Allows the M-SAT display information to be stored in a valid .ana file. OnPrintM-SAT Prints M-SAT display. OnOpenNewM-SATFile Opens a new M-SAT display. SaveM-SATToFile Allows the M-SAT information to be saved to an already open .ana file or a new file. EnableStop Enables or disables M-SAT stop feature. ShowMarkers Shows or hides markers. ShowROC Shows or hides the rate of change. ShowNameValueinPrintPreview Shows or hides analog bar object name and values in print preview and print. ZoomM-SAT Zooms M-SAT display information. ViewPopupMenu Shows or hides pop-up menu. UnzoomM-SAT Unzooms M-SAT display information. SerializeM-SATData Saves the M-SAT configuration in the container document. GetLoadedFileName Returns the file name currently open in M-SAT. ShowMetasysLogo Shows or hides the Metasys logo. IsZoomUnderLimit Returns the display when further zoom is possible. FetchBarsData Reads data for M-SAT configuration file. IsOpenAllowed Returns True when the operator has rights to open an existing M-SAT configuration file. IsEditAllowed Returns True when the operator has rights to edit M-SAT. LaunchSecurityServer Launches security server for the M-SAT ActiveX control.