LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Duplicate definitions in header file

Hello all,
 
As you can see in the attached screen shot, the header file which is generated automatically when saving the uir file, contains duplicate definitions. Of course, this causes errors during compilation Smiley Sad
I already tried deleting the h-file and saving the uir file again, but the second generated h-file has the same issue. Also tried to close CVI and launch it again. Also without success. Has anyone seen this behaviour before?
0 Kudos
Message 1 of 7
(3,411 Views)
Sorry, I forgot to attach the file Smiley Tongue
0 Kudos
Message 2 of 7
(3,410 Views)
CVI does not invent these names: they are taken from the definitions you make in the controls using the uir editor. If the control names are duplicated in the panel then they will appear duplicated in the header file. Of course, CVI normally prevents you from using duplicate names in the first place, so the question is how did they get into your panel? Did you cut and paste a tab page, perhaps?
 
JR
Message 3 of 7
(3,407 Views)

Hello JR,

First: thanks for the quick response. And of course a happy 2008 Smiley Wink

I do not have any duplicate controls on the panel.  I do have some more information on the issue. Take a look at the new screen shot in the attachment. You can see that all controls on the TAB_BVA tab page are listed three times in the header file. But the first set of controls is slightly different from the other two. What I did was adding some controls on this tab page, and changing the tabbing order of the controls. After I saved this new situation, the problems began. Now it looks like the new situation is saved in the header file, and after that the old situation is listed also (even twice). Before I saved the uir-file, I also changed the tabbing order of the controls on some other tab pages. Also these controls are listed three times in the header file: once listed in new tabbing order and twice listed in the old tabbing order...

So my first thought was that due to some CVI bug, the old uir situation is still somewhere in memory and also written to the header file. So I closed CVI, deleted the header file and restarted my PC. After reboot, I launched CVI and saved the uir-file. Unfortunately, the header file that is now generated still has the same issue Smiley Sad

0 Kudos
Message 4 of 7
(3,405 Views)
Well from your description it certainly sounds like some kind of CVI bug. What version are you using? (So the nice NI chaps can step in here! Smiley Tongue )
 
It should be possible to save your uir file in text format and then examine it with a text editor. You might then be able to see what went wrong and fix it there - with a bit of luck once you reload it as a .tui all the problems will disappear. Smiley Surprised
 
Good luck for 2008!
 
JR
Message 5 of 7
(3,391 Views)
Hi JR,
 
Looks like a CVI bug to me too. I am using the latest CVI version: CVI8.5.0 Full Development Version.
I converted my uir file into a tui file. I found out that a tab page (and every control on that tab page) appears three times in the tui file. Unfortunately, I have quite a complex User Interface, and this tab page contains another tab page, which pages contain other tab pages and so on... Since all these controls appear three times, it will take me a lot of time to delete all the duplicates in the tui file Smiley Sad
0 Kudos
Message 6 of 7
(3,341 Views)
OK, it worked. Thanks a lot for the tip JR!
0 Kudos
Message 7 of 7
(3,331 Views)