LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

UIR Edit Canvas, Load Image File

I inherited some code, and in a particular UIR, there is a diagram that I have to modify.  If I double-click the diagram (which is within a sub-panel), CVI brings up the Edit Canvas dialog box.  I select the Load Image ... button and traverse to the location of the new bitmap that I want in place of the old one.  I ultimately use TestStand to run and when the screen in question comes up, it's the old diagram.  I cannot figure out why I cannot see the new diagram.  I searched for the filename of the old bitmap, and don't see any reference to it, so I think the Edit Canvas is the only point of contact.  Is that true?
0 Kudos
Message 1 of 4
(3,611 Views)
It may seem like an obvious suggestion, but make sure that after you edit your canvas, you save your .uir with the same name and in the same location as the old one.  Also, check under Build-->Target Settings to see if the "Embed Project .UIRs" option is turned on.  If it is, you will need to rebuild the application.
0 Kudos
Message 2 of 4
(3,601 Views)
Embed Project .UIRs" option is not turned on.  So does that mean that I have to add the .uir to the DLL I create?  How do I do that?
0 Kudos
Message 3 of 4
(3,596 Views)
Hello mrbean,
 
When you select the option to embed project UIRs, they will automatically be embedded into your DLL (so you don't have to distribute the UIRs with your DLL).  The documentation for this option reads:
 
"Embeds .uir files into the DLL. Enabling this option allows you to ship only the DLL, instead of including the .uir files also. You must call LoadPanelEx with a valid calling module handle to load an embedded .uir file from a DLL. Make sure that you include all .uir files loaded through LoadPanelEx in your project if you want to ship only the DLL file. If you pass an absolute filename to LoadPanelEx, the function will always look on disk for the .uir file. If you pass a simple filename, LoadPanelEx will look first for an embedded .uir. "
 
Now, if you try to delete/rename the old dialog on your hard drive, and recompile your DLL, do you get an error saying that the image is missing?  If so, it seems like somewhere in your code, the location of the image file is hardcoded to the location of the old image.  Are you using the LoadPanelEx function to display the UIR embedded in the DLL?  Is so, are you passing the absolute or simple filename of the UIR to this function?  Finally, do you have multiple version of the UIR saved on your hard drive?  You application might be linked to a different version of the UIR.
 
Thanks
 
 
Wendy L
LabWindows/CVI Developer Newsletter
0 Kudos
Message 4 of 4
(3,585 Views)