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: 

uiconv queuing uir files

Hello community!

 

I'm using CVI 2010 with uiconv.exe fileversion 10.0.1.419

 

Our project has a lot of .uir files in different folders/directories. Is it possible to queue these files when generating code from them? It is somehow annoying to click through the folders and selecting all uir files everytime i changed only one control or attribute and want to compile the exe.

 

Can you give me a hint? Can i use any console command on uiconv.exe?

 

Thanks in advance,

 

best regards.

 

 

Konrad

0 Kudos
Message 1 of 9
(3,404 Views)

I'm not aware of a way to control uiconv via command-line parameters; additionally it appears not to have an activex interface like CVI IDE has.

 

In case you are using this tool to avoid distributing your UIR files to the customer, have you considered using the "Embed project uirs" build option? This option is located into Build >> Target settings panel; this is the help on it:

 

Embed project .UIRs—Embeds .uir files into the executable. Enabling this option allows you to ship only the executable, instead of including the .uir files also. Make sure that you include all .uir files loaded throughLoadPanel or LoadPanelEx in your project if you want to ship only the executable file. If you pass an absolute filename to LoadPanel or LoadPanelEx, the function will always look on disk for the .uir file. If you pass a simple filename, LoadPanel or LoadPanelEx will look first for an embedded .uir.

 

It may be a feasible solution in case you only want to simplify deployment process. It saves you also the few code limitations of uiconv.



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 9
(3,402 Views)

Hello, I'm bumping this old thread only to add that uiconv.exe actually has a totally undocumented (why?) command line interface, the following text is inside the exe.
BTW, I was not able to find a way to show this help by the -h switch. 

This is the help for LabWindows CVI UI to Code Converter
Options are:
-h (--help): displays the help
-f FILE (--file FILE): input UI file 
-s FILE (--source FILE): output .c file 
-i FILE (--header FILE): output .h file 
-silent: run silently - input file, as well as output .c and .h files must be specified 
-skipBuild: don't build target files after they are generated 
-outputToStdio: output to STDIO 
-stdioVisible: make STDIO visible
-noOvr: don't overwrite target files if they already exist 
-noSkipDflt: don't skip default attributes 
-noCommentSkipped: don't skip attributes as commented code (applies only when noSkipDflt is not passed) 
-initVars: init variables to zero 
-noErrChecking: don't include error-checking 
-noUseErrChk: don't use "errChk" macro (applies only when noErrChecking is not passed)

I've started today to use it to automate the generation of .c and .h to be embedded in a library.
Files must be specified with full pathname.
I've added to custom build step as follows:

"%CVIDIR%\bin\uiconv.exe" -f "%CVIPROJDIR%\test.uir" -s "%CVIPROJDIR%\test.c" -i "%CVIPROJDIR%\test.h" -silent

 

Carlo A.
Megaris




Message 3 of 9
(2,129 Views)

Thank you "carlox" for these options.

 

I have a problem, in silently mode and via the "uiconv.exe" windows,

I don't get the same results concerning the output file (*.c) (see the attached file).

 

My simple option :

...\uiconv.exe -f "%s" -s "%s" -i "%s" -noUseErrChk -noErrChecking -silent

vs

...\uiconv.exe -f "%s" -s "%s" -i "%s" -noUseErrChk -noErrChecking or (...\uiconv.exe -f "%s" -s "%s" -i "%s" -noErrChecking)

 

If I don't use the "-noUseErrChk", the "uiconv.exe" let the check "Use errChk macro" checked and not dimmed

(but don't care of it, the output file result is correct).

 

I use the same options, I only add the term "-silent" at the end of the call.

If I remove it, the "uiconv.exe" window appears, and I click on "Generate Code" button,

but the output file (*.c) is different.

 

If someone have an idea ?

 

Thanks a lot.

 


Certified LabWindows/CVI DEVELOPER (2004)
LabVIEW since 5.01 | LabWindows/CVI since 4.01
0 Kudos
Message 4 of 9
(1,374 Views)

Hello
In the "not silent" generated file I see the commented lines for default attributes.

In the GUI you have checkboxes to set their values in explicit way.
The default is to skip defaults and show them in the code as commented lines.

carlox_0-1656434776261.png

In the silent version the default should be the same, and you can add the -noSkipDflt and -noCommentSkipped options if you want alter the code generation.

Anyway the code behaviour should be exactly the same, so why bother?

 

Carlo A.
Megaris




0 Kudos
Message 5 of 9
(1,346 Views)

Hello Carlo,

 

Thanks you for your interest.

 

See the file generated with any options (-noSkipDflt -noCommentSkipped -noUseErrChk -noErrChecking)

with and without "-silent".

-f \"%s\" -s \"%s\" -i \"%s\" -noSkipDflt -noCommentSkipped -noUseErrChk -noErrChecking -silent

 

No surprise, the "C" files are different... but why ?

 

I have also opened a ticket to N.I. support.

Will see.

 

FYI :

I frequently use this tool (but manually) for a long time now.

So, I have try the various options.

This tool is very nice.

 

Long before knowing the existence of the (*.tui) file,

I created my own (*.c) file converter (under CVI) into a personal (*.ini) file.

Hence the used of "uiconv", and with only 1 PANEL into the (*.uir) file.

This one is finally very close of the format of the (*.tui) file 😉

 

See my file : "PANEL_AF.ini" from "PANEL_AF (silent - none options).c".

Here I just wanted to automate it... before maybe going directly to the (*.tui) file.

 

Regards

Patrick.


Certified LabWindows/CVI DEVELOPER (2004)
LabVIEW since 5.01 | LabWindows/CVI since 4.01
Download All
0 Kudos
Message 6 of 9
(1,338 Views)

Hy Carlo,

 

Find attached file with a LabWindows/CVI (2020 f2) project.

 

Sincerely yours


Certified LabWindows/CVI DEVELOPER (2004)
LabVIEW since 5.01 | LabWindows/CVI since 4.01
0 Kudos
Message 7 of 9
(1,312 Views)

Hy Carlo,

 

I don't remember where I picked it up.
Attached is the original source code of "UI to Code Converter" (uiconv.exe)

... but from 1998 😀

 

So very far from being up to date.

 

Regards

Patrick


Certified LabWindows/CVI DEVELOPER (2004)
LabVIEW since 5.01 | LabWindows/CVI since 4.01
Message 8 of 9
(1,295 Views)

Interesting. I wonder how it manages the more recent attributes that didn't exist at the time. I'll be taking a look at the code.

0 Kudos
Message 9 of 9
(1,289 Views)