This class contains the DCOM connection to the LabVIEW application and stores a reference to all the loaded VIs (not just those of the current configuration) in a dictionary. There are methods for starting and stopping LabVIEW application, loading and running VIs, and for controlling their status. More...
Static Public Member Functions | |
static Boolean | AreYouThere () |
static Boolean | CloseVI (String fileName) |
Method for closing a VI. The VI cannot be closed if it is still running, so it has to be aborted first. Note: the VI will still be in memory until LabVIEW is closed, so if it is reopened the "closed" version will be brought back with the same settings as before. This is why it is important that the LabVIEW process is terminated when a configuration is closed. More... | |
static int[] | GetBounds (String fileName) |
Method to get the bounds of a VI's front panel. It is messy bcause the application returns the values as an array of objects. More... | |
static Object[] | GetCluster (String fileName, String clusterName) |
Method for retrieving the values of a cluster/array as one lump. A cluster is an untyped array, that may contain a range of types. it is not listed as a control in LabVIEWPanel, so the name must be known. There are no checks to see if the control exists. More... | |
static Boolean | GetControls (String fileName, Boolean includeClusters) |
Method for getting a list of the controls on a VI's front panel. The list of controls are stored in the corresponding LabVIEWPanel class. More... | |
static String | GetControlTime (String fileName, String control) |
static String | GetFrontPanelTitle (String fileName) |
Gets the current window title of the VI's front panel More... | |
static List< String > | GetListOfControls (String fileName) |
Method for retrieving a list of a front panel's controls. More... | |
static List< String > | GetLLBInfo (String fileName) |
Method for getting a list of VIs in a LabVIEW Library file (.llb). The is done via a National Instrument VI that loads the .llb and lists the contents on the front panel. Not an ideal method, but it appears to be the only way. More... | |
static Object | GetRawValue (String fileName, String controlName) |
Method for retrieving a raw value of a front panel's control. This method returns the control value exactly as it comes off the VI, no tidying up or casting is performed. There is no checking to see if the control exists - if there is any problems it will throw an error. More... | |
static String[] | GetValue (String fileName, String controlName) |
Standard Method for retrieving a value of a front panel's control. The control has to exist in the corresponding LabVIEWPanel class. Returns an array because the control may be an array or cluster. More... | |
static Boolean | HideAllVIs () |
Method to hide all the VIs' front panels. Done via the LabVIEW application not Win32 API. More... | |
static Boolean | HideVI (String fileName) |
Method to hide a VI's front panel. Done via the LabVIEW application not Win32 API. More... | |
static Boolean | IsVIHidden (String fileName) |
Method to check whether a VI is hidden or not More... | |
static Boolean | IsVIPresent (String fileName) |
Method for checking whether a VI is present in the dictionary. More... | |
static Boolean | IsVIRunning (String fileName) |
Method for checking whether a VI is a running state. More... | |
static Boolean | LoadVI (String fileName, Boolean includeClusters) |
Method for loading a VI. More... | |
static Boolean | LoadVI (LabViewPanelInfo panelInfo, Boolean includeClusters) |
Method for loading a VI. More... | |
static void | MinimiseVI (String fileName) |
Method to minimise the front panel More... | |
static Boolean | MoveFrontPanel (String fileName, int[] bounds) |
Method to set the position of a VI's front panel. This does not change the width or height of the panel. First old bounds are found and the width and height are calculated. Then the new bottom-right position is set as the new top-left co-ordinates plus the old width and height. More... | |
static void | RestoreVI (String fileName) |
Method to restore the front panel (i.e. no longer minimised) More... | |
static Boolean | SetCluster (String fileName, String clusterName, Object[] values) |
Method for setting a cluster or array's value. A cluster is an untyped array, that may contain a range of types. it is not listed as a control in LabVIEWPanel, so the name must be known. There are no checks to see if the control exists. More... | |
static Boolean | SetRawValue (String fileName, String controlName, Object value) |
Method for setting a raw value on a front panel's control. This method sends the value straight to the VI no checks are performed. There is no checking to see if the control exists - if there is any problems it will throw an error. More... | |
static void | SetTitleBarVisibility (String fileName, Boolean visible) |
Method to set the appearance of a VI's front panel. If set to false then the VI will be shown without the titlebar, borders etc. More... | |
static Boolean | SetValue (String fileName, String controlName, Object value) |
Standard method for setting a control's value on the front panel. More... | |
static Boolean | ShowVI (String fileName) |
Method for displaying a VI and bringing it to the front. The front panel can be made visible through the LabVIEW application; however, the Win32 API is required to bring it to the front of the screen. More... | |
static Boolean | StartLabView (String executionDir) |
Create an instance of LabVIEW, if one has not been started. Also starts the controls exporter VI. If LabVIEW fails to start then this is a serious problem. More... | |
static Boolean | StartVI (String fileName) |
Start the specified VI running. More... | |
static Boolean | StopLabView () |
Method for stopping LabVIEW. The safest way to kill LabVIEW is to kill the process as this guarantees that it has closed completely. More... | |
static Boolean | StopVI (String fileName) |
Stop the specified VI from running. More... | |
static void | UpdateFrontPanelTitle (String fileName) |
Update the stored window title for the front panel of the VI More... | |
Properties | |
static Boolean | IsNull [get] |
static List< String > | VIsNotLoaded [get] |
Static Private Member Functions | |
static void | configureLabVIEW () |
Method for editing the LabVIEW.ini file. This is set to do the following: More... | |
static void | getFrontPanelTitle (String fileName) |
Update the stored window title for a specific front panel More... | |
static bool | loadVI (String filepath, LabViewPanelInfo panelInfo, Boolean includeClusters) |
Main method for loading a VI. Uses the LabVIEW application command GetVIReference to load the VI The VI object is then stored in the dictionary. Finally, a list of the front panel controls is acquired. More... | |
Static Private Attributes | |
static strongnameLabview.VirtualInstrument | _controlsExporter |
A VI that is used to export the controls list of other VIs. More... | |
static strongnameLabview.Application | _LV |
The LabVIEW application. More... | |
static SerialisableList < LabViewPanelInfo > | _panelsSettings |
List containing the settings for the panels. This is the information that is saved in the configuration. More... | |
static strongnameLabview.VirtualInstrument | _titleExporter |
A VI that is used to get the title of the front panel. More... | |
static Dictionary< String, LabViewPanel > | _VIs |
Dictionary for storing the VIs as they are loaded - stored using their filepath as a key. More... | |
static List< String > | _VIsNotLoaded = new List<String>() |
Contains a list of the VIs that could not be loaded as the VI could not be found. More... | |
This class contains the DCOM connection to the LabVIEW application and stores a reference to all the loaded VIs (not just those of the current configuration) in a dictionary. There are methods for starting and stopping LabVIEW application, loading and running VIs, and for controlling their status.
Definition at line 20 of file LabViewApp.cs.
|
inlinestatic |
Definition at line 203 of file LabViewApp.cs.
Referenced by Seci.LabView.LvmqUpdater.backgroundUpdater_DoWork().
|
inlinestatic |
Method for closing a VI. The VI cannot be closed if it is still running, so it has to be aborted first. Note: the VI will still be in memory until LabVIEW is closed, so if it is reopened the "closed" version will be brought back with the same settings as before. This is why it is important that the LabVIEW process is terminated when a configuration is closed.
fileName | The full filepath for the required VI |
Definition at line 336 of file LabViewApp.cs.
References Seci.LabView.LabViewPanelInfo.FilePath.
|
inlinestaticprivate |
Method for editing the LabVIEW.ini file. This is set to do the following:
Definition at line 137 of file LabViewApp.cs.
References Seci.Definitions.Status.LabViewIniFilePath.
|
inlinestatic |
Method to get the bounds of a VI's front panel. It is messy bcause the application returns the values as an array of objects.
fileName | The full filepath of the VI |
Definition at line 635 of file LabViewApp.cs.
|
inlinestatic |
Method for retrieving the values of a cluster/array as one lump. A cluster is an untyped array, that may contain a range of types. it is not listed as a control in LabVIEWPanel, so the name must be known. There are no checks to see if the control exists.
fileName | The full filepath of the VI |
clusterName | The name of the cluster |
Definition at line 888 of file LabViewApp.cs.
|
inlinestatic |
Method for getting a list of the controls on a VI's front panel. The list of controls are stored in the corresponding LabVIEWPanel class.
fileName | The full filepath of the VI |
includeClusters | Whether to include clusters |
Definition at line 774 of file LabViewApp.cs.
|
inlinestatic |
Definition at line 810 of file LabViewApp.cs.
|
inlinestaticprivate |
Update the stored window title for a specific front panel
fileName | The full filepath for the required VI. |
Definition at line 294 of file LabViewApp.cs.
|
inlinestatic |
Gets the current window title of the VI's front panel
fileName | The full filepath for the required VI. |
Definition at line 312 of file LabViewApp.cs.
|
inlinestatic |
Method for retrieving a list of a front panel's controls.
fileName | The full filepath of the VI |
Definition at line 796 of file LabViewApp.cs.
|
inlinestatic |
Method for getting a list of VIs in a LabVIEW Library file (.llb). The is done via a National Instrument VI that loads the .llb and lists the contents on the front panel. Not an ideal method, but it appears to be the only way.
fileName | The full filepath of the library |
Definition at line 479 of file LabViewApp.cs.
References Seci.Definitions.Status.ExecutionDir.
|
inlinestatic |
Method for retrieving a raw value of a front panel's control. This method returns the control value exactly as it comes off the VI, no tidying up or casting is performed. There is no checking to see if the control exists - if there is any problems it will throw an error.
fileName | The full filepath of the VI |
controlName | The name of the control |
Definition at line 858 of file LabViewApp.cs.
|
inlinestatic |
Standard Method for retrieving a value of a front panel's control. The control has to exist in the corresponding LabVIEWPanel class. Returns an array because the control may be an array or cluster.
fileName | The full filepath of the VI |
controlName | The name of the control |
Definition at line 827 of file LabViewApp.cs.
|
inlinestatic |
Method to hide all the VIs' front panels. Done via the LabVIEW application not Win32 API.
Definition at line 607 of file LabViewApp.cs.
|
inlinestatic |
Method to hide a VI's front panel. Done via the LabVIEW application not Win32 API.
fileName | The full filepath of the VI |
Definition at line 582 of file LabViewApp.cs.
|
inlinestatic |
Method to check whether a VI is hidden or not
fileName | The full filepath of the VI |
Definition at line 733 of file LabViewApp.cs.
|
inlinestatic |
Method for checking whether a VI is present in the dictionary.
fileName | The full filepath of the VI |
Definition at line 382 of file LabViewApp.cs.
|
inlinestatic |
Method for checking whether a VI is a running state.
fileName | The full filepath of the VI |
Definition at line 392 of file LabViewApp.cs.
|
inlinestatic |
Method for loading a VI.
fileName | The full filepath for the required VI |
includeClusters | Whether to include clusters |
Definition at line 226 of file LabViewApp.cs.
|
inlinestatic |
Method for loading a VI.
panelInfo | The panel information for the required VI |
includeClusters | Whether to include clusters |
Definition at line 237 of file LabViewApp.cs.
References Seci.LabView.LabViewPanelInfo.FilePath.
|
inlinestaticprivate |
Main method for loading a VI. Uses the LabVIEW application command GetVIReference to load the VI The VI object is then stored in the dictionary. Finally, a list of the front panel controls is acquired.
filepath | The full filepath for the required VI. |
panelInfo | The panel information for the required VI (is null for default VIs) |
includeClusters | Whether to include clusters |
Definition at line 252 of file LabViewApp.cs.
|
inlinestatic |
Method to minimise the front panel
fileName | The full filepath of the VI |
Definition at line 705 of file LabViewApp.cs.
|
inlinestatic |
Method to set the position of a VI's front panel. This does not change the width or height of the panel. First old bounds are found and the width and height are calculated. Then the new bottom-right position is set as the new top-left co-ordinates plus the old width and height.
fileName | The full filepath of the VI |
bounds | The new position of the top-left corner |
Definition at line 672 of file LabViewApp.cs.
|
inlinestatic |
Method to restore the front panel (i.e. no longer minimised)
fileName | The full filepath of the VI |
Definition at line 718 of file LabViewApp.cs.
|
inlinestatic |
Method for setting a cluster or array's value. A cluster is an untyped array, that may contain a range of types. it is not listed as a control in LabVIEWPanel, so the name must be known. There are no checks to see if the control exists.
fileName | The full filepath of the VI |
clusterName | The name of the cluster |
values | The new values for the cluster |
Definition at line 979 of file LabViewApp.cs.
|
inlinestatic |
Method for setting a raw value on a front panel's control. This method sends the value straight to the VI no checks are performed. There is no checking to see if the control exists - if there is any problems it will throw an error.
fileName | The full filepath of the VI |
controlName | The name of the control |
value | The new value |
Definition at line 946 of file LabViewApp.cs.
|
inlinestatic |
Method to set the appearance of a VI's front panel. If set to false then the VI will be shown without the titlebar, borders etc.
fileName | The full filepath of the VI |
visible | Whether to show the title bar etc |
Definition at line 754 of file LabViewApp.cs.
|
inlinestatic |
Standard method for setting a control's value on the front panel.
fileName | The full filepath of the VI |
controlName | The name of the control |
value | The new value |
Definition at line 913 of file LabViewApp.cs.
|
inlinestatic |
Method for displaying a VI and bringing it to the front. The front panel can be made visible through the LabVIEW application; however, the Win32 API is required to bring it to the front of the screen.
fileName | The full filepath of the VI |
Definition at line 528 of file LabViewApp.cs.
|
inlinestatic |
Create an instance of LabVIEW, if one has not been started. Also starts the controls exporter VI. If LabVIEW fails to start then this is a serious problem.
executionDir | The directory from which the program is being run |
Definition at line 66 of file LabViewApp.cs.
|
inlinestatic |
Start the specified VI running.
fileName | The full filepath of the VI. |
Definition at line 420 of file LabViewApp.cs.
|
inlinestatic |
Method for stopping LabVIEW. The safest way to kill LabVIEW is to kill the process as this guarantees that it has closed completely.
Definition at line 98 of file LabViewApp.cs.
|
inlinestatic |
Stop the specified VI from running.
fileName | The full filepath of the VI |
Definition at line 446 of file LabViewApp.cs.
|
inlinestatic |
Update the stored window title for the front panel of the VI
fileName | The full filepath for the required VI. |
Definition at line 321 of file LabViewApp.cs.
|
staticprivate |
A VI that is used to export the controls list of other VIs.
Definition at line 40 of file LabViewApp.cs.
|
staticprivate |
The LabVIEW application.
Definition at line 25 of file LabViewApp.cs.
|
staticprivate |
List containing the settings for the panels. This is the information that is saved in the configuration.
Definition at line 35 of file LabViewApp.cs.
|
staticprivate |
A VI that is used to get the title of the front panel.
Definition at line 45 of file LabViewApp.cs.
|
staticprivate |
Dictionary for storing the VIs as they are loaded - stored using their filepath as a key.
Definition at line 30 of file LabViewApp.cs.
|
staticprivate |
Contains a list of the VIs that could not be loaded as the VI could not be found.
Definition at line 50 of file LabViewApp.cs.
|
staticget |
Definition at line 55 of file LabViewApp.cs.
|
staticget |
Definition at line 53 of file LabViewApp.cs.