UI Interest Group Documents

cancel
Showing results for 
Search instead for 
Did you mean: 

User Interface Manager

 

This tool is provided as an example to the LabVIEW user community under the Sample Code License (ni.com/samplecodelicense). It is not a National Instruments product and not supported through the regular support channels. Please leave questions and feedback about the UI Manager in the comment section below and rate the document. Please provide suggestions for new features and improvements and related use cases.

 

The VI Package is built using VI Package Manager 2017. You can get it by installing LV 2017 or by downloading VIPM for this page - https://vipm.jki.net/

 

User Interface Manager is compatible with LV 2016 or later.

 

This tool is designed to help programmers capture and apply complex UI configurations to any LV VI, both at edit and run time. Using the User Interface Manager Tool and its API, you will be able to configure your UI, capture that configuration, export and import it from XML file, and apply any previously captured configuration. Using this tool you can separate the configuration of your UIs from your application functionality and still be able to achieve any effect as you would using standard VI Server methods and properties.

 

If the user interface property you want to capture is not handled by the standard provided UIPs, you can create a new one, using the UIP Class Template. By providing your own implementation for five simple methods, you will be able to capture any property from the controls on your VI front panel.

 

This tool has not been tested on LINUX RT with UI.

 

Some of the use cases that can be handled by this tool include:

  • Localization of the UI
  • Changing visibility of controls
  • Changing the enabled state of controls
  • Changing the color scheme of the UI
  • Resizing UI to fit resolution
  • Setting the values of controls

Currently available User Interface Properties (UIPs):

  • CaptionUIP
  • VisibleUIP
  • DisabledUIP
  • SizeUIP 
  • PositionUIP
  • DescriptionUIP
  • TipStripUIP
  • ValueUIP

Example additional UIPs (in ZIP archive):

  • Waveform Chart Color
  • Boolean Color
  • Owning Pane Color

 

The package provided below, installs the UI Manager API to be used programmatically in your applications and the UI Manager Tool in the LabVIEW Tools menu, which allows you to capture UI states interactively in a user friendly way.

 

Version 1.10

- Increased performance of the UIM Tool when working with big projects by limiting the number of memory scans for open VIs.

 

Version 1.9.0

- Added new functionality for specifying the UIPs used by UIM. Now the UIPs are specified within the XML itself in the UIPList tag. If no UIPList tag is specified in the XML the default UIPs and the Plugin UIPs will be used. If the UIPList tag is specified then only the specified plugins will be used.
- Flatten and Unflatten from String XML functions added to make it easier to specify the UIM strucutre in code, by string.
- Save XML function modified to generate Pretty Printed files.

 

Version 1.8.0

- New ValueUIP supporting: String, Numeric, Boolean, Slide, Knob, TabControl, Path, Enum, Ring. The parsing of these values happens while getting and setting the values. Because of this they are a little slower than other properties. Use with caution.
- Included example about the ValueUIP

 

Version 1.7.1

- Updated interface for adding new UIPs to make it easier to use in executable.
- Filtered the list of VIs in memory to only the ones that have FP open and valid (UI Manager Tool).
- Reformated some of the interfaces of the UIP related methods.
- Added to Capture State checking for duplicated label names and returning error in that case.

- Added detailed description link to UIM community web-page to VI and tool.

- Added right click menu to controls on the FP to capture state from only specified controls on right click.

- Corrected bug that would cause crash in different LV versions when using the UIM.
- Rearranged some of the functions and API to work easier and less error prone with inbuilt UIPs.

- Removed project from package not to confuse users
- Added a plugin UIP folder handling. The folder location is <User Documents>\LabVIEW Data\UIP
- Removed the compiled EXE version of the example because it caused confusion

 

Version 1.5.4

- Changed the behavior when user wires CTL reference into Apply or Capture method. Right now the behavior is that the wired references are used and the VI is not traversed for references. This improves performance in big applications, by specifying up front, which CTL refs to use.

 

Version 1.5.3

- Updated the examples with more descriptive names. Modified one example to show how an app with UIM API can be built into an executable.

 

Version 1.5.2

- Removed the requirement for other packages to be installed with this tool. Now it is an independent package. Removed some small errors related to running the tool from the menu.

 

Version  1.4.3

- Due to unforeseen bug while loading had to revert back to LV 2016. The package is again only available in LV 2016 and higher.

 

Version 1.1.1

- Includes a QuickDrop shortcut for capturing the UI state into an XML file. Now, to capture state of the UI you just need to press Ctrl+Space Ctrl+U. The file generated this way will have the same name as the VI and the extension XML. It can be then loaded using the API or the UI Manager Tool from the tools menu.

An additional option you can use is the <Ctrl><Shift>+<U> which will take the text from the QuickDrop ComboBox and use this text as the UI state name. 


 

Picture1.png

 

Figure 1: Main window of the UI Manager Tool


uim67.png

 

Figure 2: UI Properties specification pane in the UI Manager Tool


uim68.png

 

Figure 3: Function palette for the UI Manager showing the API functions


 

Picture4.png

 

Figure 4: Example of programmatically setting the UI configuration using the UI Manager API


 

Picture1.png

 

Figure 5: Capturing UI State for many controls using Right Click Menu

Picture5.png

 

Figure 6. XML representation for the UI Manager



 

Please provide comments, feedback and feature suggestions in this forum post: http://forums.ni.com/t5/UI-Interest-Group-Discussions/Feature-suggestions-for-User-Interface-Manager...

Best regards, Piotr

Certified TestStand Architect
Certified LabVIEW Architect
Comments
Active Participant PrimaryKey
Active Participant

Hejka everyone, please let me know if and how are you using User Interface Manager in your projects?

Best regards, Piotr

Certified TestStand Architect
Certified LabVIEW Architect
Active Participant PrimaryKey
Active Participant

Working on some improvements for UIM. Please point out if you would like some new features, new plugins etc.

1. Will improve performance of the UIM Tool in the menu when working with big projects.

2. ??? Give me your ideas.

 

Best regards, Piotr

Certified TestStand Architect
Certified LabVIEW Architect
Active Participant MichaelAivaliotis Active Participant
Active Participant

 I haven't downloaded the tool or tried it out yet, but I think this might help with an application I'm working on. I need to have IO mapped to some UI controls and indicators. However, the UI has 3-4 different configurations, because of the DUT has the IO located in different parts of the system. I was thinking of creating 3-4 different UIs to handle the changes. But perhaps one UI can be created, then using this tool I can hide or show the appropriate control. It would be better if this tool had the ability to move controls to a location on the UI. Then the IO mapping could stay the same, but the control or indicator would change position on the screen. I assume this would require the UI to be idle (not running).



Michael Aivaliotis
VI Shots LLC
Active Participant PrimaryKey
Active Participant

Hejka Michael, the position of UI elements is handled right out of the box, allowing you to move your controls. It is also working when the UI is running.

Best regards, Piotr

Certified TestStand Architect
Certified LabVIEW Architect
Active Participant PrimaryKey
Active Participant

I have updated the package to fix the bug with UIM Tool hanging with big projects. Now you can hit the refresh button if you think the VIs UI and references have changed, but normally it will only scan memory once for VIs, instead of continuously, thus hanging the tool with a lot of VIs in memory.

Best regards, Piotr

Certified TestStand Architect
Certified LabVIEW Architect
Active Participant kosist90
Active Participant

Hello Piotr,

 

for sure there is one feature, which many people wait for, but not ask - language translation support ))) All the point is in unicode symbols handling... I know that JKI now has some new tool for localization - would it be possible to merge two solutions, and have new plugin for UIM?

 

Sincerely, kosist90.

Member 刘訫
Member

Great Tools,I think I have apply this tools to the olded version Labview,such as LV 2011 LV2014,and resolve some 'bugs' ! 

Active Participant PrimaryKey
Active Participant

What are the bugs you experience 刘訫 ?

Best regards, Piotr

Certified TestStand Architect
Certified LabVIEW Architect
Member StefanLemmens
Member

Piotr,

 

I noticed that on "The splitter & pane manager" topic you suggested to use the UIM with subpanels. This made me wonder if it would be possible to use the UIM with splitters and panes. This would mean that the reference that is stored would need to be of the VI Server type GObject in stead of Control and then the VI Server Class Name could be used to typecast it to a more specific reference type e.g. control, splitter, pane, decoration,...

 

Is this something that could be done? Or am I overlooking something  in the UIM?

 

Kind Regards,

Stefan Lemmens

Intersoft Electronics

Active Participant PrimaryKey
Active Participant

The decision in the design I made was to use Control type. This was to limit the scope of this tool applicability so that I don't kill myself with the amount of work and figuring out the kinks. Fundamentally you could do it, I just was a single developer working on this. That is the reason the scope is more narrow. 

Best regards, Piotr

Certified TestStand Architect
Certified LabVIEW Architect
Member StefanLemmens
Member

I completely understand. It' always better to provide a good tool then an overcomplicated one Smiley Wink

 

By the way, I did a presentation on "VI Descriptions and UI Properties" at our DutLUG and promoted your tool quite a lot. You can find the presentation and demo's here

I'am doing the same presentation again at the User Group Track at the NI Industry Summit Benelux 2018 (on Octobre 31 in Eindhoven).

If you have any additional tips or info just let me know.

 

Kind Regards,

Stefan Lemmens

Intersoft Electronics

Active Participant PrimaryKey
Active Participant

Thank you for letting me know. I had a look at your presentation and it looks great! Thank you for creating the XLST, it was something I had on my road-map as a potential improvement. With your help we could add it directly into the tool Smiley Happy With enough push from the community I might be able to provide somethings like this for NXG and also focus a little more on 2019 version Smiley Wink

Best regards, Piotr

Certified TestStand Architect
Certified LabVIEW Architect
Member nik35324
Member

Hello,

 

Today I updated the package from 1.9.0.170 to 1.10.0.140.

Version 1.9.0.170 is saved in folder "C:\Program Files (x86)\National Instruments\LabVIEW 2017\vi.lib\User Interface Manager" and

Version 1.10.0.140 is saved in folder "C:\Program Files (x86)\National Instruments\LabVIEW 2017\vi.lib\UIM"

 

I have written VI's with version 1.9.0.170. Each time when the VI is executed the program is trying to load the classes from :

"C:\Program Files (x86)\National Instruments\LabVIEW 2017\vi.lib\User Interface Manager". 

Image 1.png

 

Image 3.png

 

Is there a bug or am I doing something wrong?

 

Thanks and Regards,

Nikhil.

Active Participant PrimaryKey
Active Participant

I had to change the length of the path to make it safer with Windows path length limitation, and in the original path the name User Interface Manager was just to long. I am using UIM on my machine in the newest version and do not have this issue. If I can recommend, please try to uninstall the package, go to the LabVIEW folders and remove manually any UIM related artifacts that might still be there, and then install again. This kind of clean install should solve the problem.

Best regards, Piotr

Certified TestStand Architect
Certified LabVIEW Architect
Member nik35324
Member

Hi Piotr,

 

The issue has been resolved.

The problem was the path of the class defined under child "UIPList" in the generated xml file. Replaced "User Interface Manager" to "UIM".

 

Does one need this child section at all?

Image 7.png

Regards

Nikhil.

Member nik35324
Member

Right Click Menu "UI State Capture": Capturing UI State for many controls doesn't appear in LabVIEW 2017. UIM Version: 1.10.0.40

Any help would be greatly appreciated.

Thankyou.