LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

UI to Code Converter to Merge two UIR files (or at least to maintain two variants)

I have a utility that has different UIR files for the two variants. One variant runs on a PC and the other variant runs on a PXI box (which has extra things for controlling some cards in the PXI box).

These panels have been added to, and modified for years, and have grown apart. They used to look very similar, but now with added functionality, they look different. 

Every time I add to the GUI, I open one and add the item, then I have to take screen shots, and write down the details, and duplicate the PXI and PC shared on the other UIR file.

 

I used the UI to Code Converter to create a .C and .H file for each, and compared those.

The PXI version has a bunch of things added that the PC version does not have. But, the size and locations of items (buttons, text boxes and so forth) is what I would like to make common.

 

I can take the two converted sets, and use IFDEF to remove the PXI specific parts for the PC build, and just use the PXI .C and .H files when I build and release my projects.

 

Another idea is to use the UIR files, and as part of my release I would generate the .C and .H files with the converter, and then use a compare tool to make the positions and sizes the same, and perform the release builds with the generated code.

 

 

 

In general, 

What is the performance difference in using a UIR versus the generated code?

Can I reverse the process and generate a UIR from the source?

How easy would it be to maintain the source versus the UIR file?

 

 

Does anyone else have multiple variants that they are maintaining? How do you handle the different UIRs?

0 Kudos
Message 1 of 2
(3,377 Views)

Hi Ken,

 

This is a good question and you are definitely on the right track with what you are doing. There is currently no way to track differences in UIR files directly. You can use the UI to Code Converter but an easier way would be to create a TUI file. This saves your UI in text format. This is done by going to Options» Save in Text Format.

 

Here are some articles on TUI Files:

TUI Files in LabWindows/CVI

How Can I Compare UIR Files in CVI to Track Changes?

 

With the TUI, you can reload your UI from the text file very easily, by going to Options»Load from Text Format. If you have a large UI, this will be slower to load from the TUI file than from a corresponding UIR file, but you shouldn't see run-time differences.

 

What's nice about the TUI file is that you can load it and use it like you would a UIR file, while also tracking differences in the text file.

 

I hope this helps!

Tanya Visser
National Instruments
LabVIEW Group Manager
0 Kudos
Message 2 of 2
(3,336 Views)