LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I put a dialog (".uir") into a library complete with its controlling subroutines (".niobj")?

I have a subroutine library called "VoxsonPassword.niobj" (about 5 routines including callbacks) which displays a dialog called "VoxsonPwDialog.uir" and asks for a password.

I want to put "VoxsonPassword.niobj" and "VoxsonPwDialog.uir" into a library here at work so that other people can use them (naturally!).

This library is called "c:\rdtools\lib\pc_cvi\pc_cvi.lib" and is created from dozens of ".niobj"s.

This means that people can link to "VoxsonPassword()" (one of the routines in "VoxsonPassword.niobj") by putting "c:\rdtools\lib\pc_cvi\pc_cvi.lib" into their build.

1. The main question is "WHAT DO I DO WITH THE ".uir" FILE?"

2. Does the user have to
link to this file manually, too?

3. Or can I put it in the ".lib" file somehow?
0 Kudos
Message 1 of 4
(2,720 Views)
Starting from CVI 6.0 there is a feature to transform panels into source code (Tools >> UI to Code converter).
By this feature, you don't need the .UIR file any more, because in your code is automatically created the lines necessary to create and disply the panel you designed in the uir editor.

If you have a version since 5.5 inclusive, this feature is unavailable, but all the functions needed are (NewPanel, SetPanelAttribute, NewCtrl, SetCtrlAttribute), and this work can be done manually by yourself. I assume a panel to ask a password can be slightly simple, so the work shouldn't be too much even in this case.

Hope that helps.
Roberto


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 2 of 4
(2,720 Views)
Thanks, Roberto,

We have 5.5 here only. It looks like I'll just have to specify the ".lib" and the ".uir" until (and if) we ever get 6.0.

Thanks,
Alf Lacis
0 Kudos
Message 3 of 4
(2,720 Views)
This is not completely true.
I found the UI to Code Converter in my CVI 5.5.1 too.
It's located in the Tools menu. First you have to save your panel in text format ('Options >> Save in text format' menu) and then convert it with the converter.

Besides it, the code necessary to generate a panel is simply a boring work of creating a new panel and some new controls and setting their attributes.

As an example, attached you will find a simple UIR with a panel for asking a password to the user. I add the source and include file generated by the UI to code converter tool. The files are exactly as they were generated by the tool, comments inclusive.

Roberto


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Download All
0 Kudos
Message 4 of 4
(2,720 Views)