From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Labwindows UIR

Solved!
Go to solution

Hi,

 

I have an existing program with a user interface developed in labwindows.

I would like to change it and make it more user-friendly, "beautiful" and in step with the times.

Unfortunately using labwindows I cannot do it because the UI development tools are not adequate.

Is there a way to put a "skin" on the interface?

Or develop an interface with Adobe Xd or QT and transport it to labwindows without touching the code or compromising the functioning (?).

Otherwise could I transport the interfaces to visual studio and reinsert them on the CVI project without compromising anything ?.

 

Thanks

0 Kudos
Message 1 of 15
(3,784 Views)

Hi! I'm very new to Labwindows/CVI, but kind of in the same position as you. I inherited some old CVI code that was written 10-20 years ago and, predictably, everything has a 90's feel to it. Unfortunately there is no way to "skin" CVI, but you can set a default appearance for a few things (like font) that has effect on all controls you create after that (Solved: Predefining visuals of a project - NI Community).

 

What you can do in CVI is to use "Classic Style" controls (right-click uir and you should find it in the drop-down list), which allows you to play around with colors and such more than usual (if I remember correctly). There's also an option under Control Appearance called "Disable Panel Theme", which may open some doors for you (I haven't needed to use this though).

Another thing I did to make it look more modern was to set the fields and button colors to transparent, and then put a box underneath, which makes fields and buttons look flat. I attached an example of what it looks like (I know the colors are dull, but shows the concept at least). It is a work-around, but works well and allows you to play around a bit more.

 

That said - I'd probably consider using another tool if the visual aspect is very important for your project. You won't likely be able to import outside tools like QT or Adobe into CVI, but you could probably import the CVI code (or whatever you need from it, like the DAQmx libraries) into something else (like visual studio) and then import QT into that and try to puzzle them together. I have tried a bit myself, but I'm not very Visual Studio-competent, and am having some trouble getting VS to understand what CVI stuff it needs to import for my existing project to work. Allegedly it is possible - at least with VS 2005... (Integrating LabWindows™/CVI™ with Microsoft Visual C++ - National Instruments (ni.com))

If you manage to get it to work, then I'd be very thankful if you shared the process here! 🙂

0 Kudos
Message 2 of 15
(3,725 Views)

Well, it's true that CVI isn't the most up-to-date development environment when designing the user interface, but I'd like to strike a blow for it since there's more in CVI than you can imagine.

 

As guybrush_threepwood mentioned, you can play with several attributes for panels and controls to obtain various effects on the UI, like below:

Screenshot 2021-06-11 09.17.28.png

 

But with a bit of imagination and some coding effort several alternative effects can be obtained, as you can see here:

Screenshot 2021-06-11 09.54.42.png

 

That is to say, before going the CVI-VS-Qt-integration path, which can be very time-consuming, you could spend some time experimenting with the options you have at hand in CVI.



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?
0 Kudos
Message 3 of 15
(3,698 Views)

Ciao Roberto grazie mille per la tua risposta, capisco ma purtroppo essendo un progetto aziendale diciamo che volevo fare le cose come si deve.

Per questo vorrei spostarmi su QT considerando che ho all'incirca 50 sorgenti, richiederebbe molto tempo?

Come mi consiglieresti di procedere?

Hai qualche reference dove prendere informazioni su come fare?

 

Ti ringrazio moltissimo.

 

English Version:

Hi Roberto thank you very much for your answer, I understand but unfortunately being a company project let's say that I wanted to do things properly.

For this I would like to move to QT considering I have about 50 sources, would it take a long time?

How would you advise me to proceed?

Do you have any reference where to get information on how to do it?


Thank You very much.
 
0 Kudos
Message 4 of 15
(3,689 Views)

La risposta breve è "non ne ho la più pallida idea"!

Con pochissima esperienza su VS e nessuna su Qt non posso proprio aiutarti. Fra l'altro l'integrazione di diversi sistemi di sviluppo è una strada che cerco di evitare perché -a mio parere- foriera di problemi che non penso di avere le risorse per risolvere.

 

Hello, the short answer is that I have no idea!

Having very little expertise on VS and none at all on Qt I cannot give you any help. Furthermore, I tend to avoid the integration of different development environments because I don't think I have the resources to address the problems that as far as I can understand are very likely to arise.



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?
0 Kudos
Message 5 of 15
(3,685 Views)
Solution
Accepted by topic author johnbop

Ciao Roberto,

Rispondo solo ora ma sono stato impegnato questi giorni.

 

La mia conclusione è creare una libreria delle funzioni create e richiamarle esternamente dalla GUI creata con QT sperando che funzioni.

 

Grazie mille e se qualcuno ha idee migliori le scriva pure

 

English Version:

 

Hello Roberto,

I answer only now but I have been busy these days.


My conclusion is to create a library of the created functions and call them externally from the GUI created with QT hoping it will work.


Thank you very much and if anyone has better ideas please write them down

0 Kudos
Message 6 of 15
(3,636 Views)

Hi,

 

I am facing the same question as you did.I try to move my labwindows/CVI project to Microsoft VS 2015 and add QT in it .I moved the source file to VS2015, set some configures, transformed the ".uir" file to "uirfile.h"and "uirfile.c" then added them to VS2015. 

 

By now ,I can compile and run the program in VS2015 with QT, a labwindows/CVI panel and a QT window will show together ,which means there are two windows on my screen( and two icon overlap together on the taskbar ).I can control the labwindows/CVI panel or control the QT window.

 

I am still trying on how to merge the two windows to one window(or hide one icon on the taskbar) and how to control the  labwindows/CVI panel by manipulating the QT window .

0 Kudos
Message 7 of 15
(3,430 Views)

Thanks for the reply,

Really, did you just do that?

How did you do for transform the file from .uir to uirfile.h and uirfilce.c?

 

I am hoping for a response from you.

Really thanks

0 Kudos
Message 8 of 15
(3,417 Views)

Hi johnbop

 

I am using  NI LabWindows CVI  2017, when editing the .uir file in CVI ,there is a "Conventer" tool in "Tools" which can build the .uir file to ".c &.h"file.

360截图20210928173036507.png

 

Although this can work ,I still want to import .uir file to my VS2015 project without the "Conventer" dealing.  IF I use the .uir file in my VS2015 project ,it cannot build successfully , with a CVI Messagebox saying"ERROR in call to loadPanel...".

360截图20210928174128866.png

 

Wish we succeed in decorating labwindows/CVI project. 😀

0 Kudos
Message 9 of 15
(3,410 Views)

Hi, DAHIT!

 

Could you give a brief description of how you integrated the Labwindows functionality (DAQmx libraries and other similar stuff) into Visual Studio? For instance, what do you need to include in the build to make it recognize "CVICALLBACK" as a keyword?

 

Thanks!

0 Kudos
Message 10 of 15
(3,400 Views)