03-17-2008 09:57 PM
03-18-2008 08:41 AM
Hi tucis,
Every time you make a modification to a UIR file and then save it, CVI automatically generates a new header (.h) file that contains the appropriate callback functions and the ID constant names associated with your panels and controls. In your case, you forced a change by adding a new panel to your UIR and then you probably saved it. When you did this, a new header file was created with the same name as your UIR. Allow me to explain in a little more detail..
Controls in the User Interface Editor are recognized in CVI by their constant name and Control ID. The User Interface Editor appends the constant name of the control to the constant name of the panel to create the Control ID. For example, if the constant name of the panel is PANEL, and the constant name of the control is GENERATE, then the Control ID is PANEL_GENERATE. These Control IDs are defined in the header file that CVI generates when you save the .uir file. You use these Control IDs with the control-specific functions, such as GetCtrlVal and SetCtrlAttribute.
Now, with all that said, my guess as to what is happening is that your source code is actually using the numerical constants associated with the Controls IDs (which can be fond in the UIR header file) which isn't good practice. You should always use the actual Control ID name and not the value associated with it because these values can change based on changes you make in the UIR such as changing the tab order, adding/deleting controls, adding a new panel, etc. So you are probably calling some control-specific function using a ID that has changed and its no longer valid (i.e. maybe you are trying to set a LED attribute for a numeric control as this used to work becuase the numerical value happened to correspond to a LED control but now it doesn't).
If you are using the numerical value, then I would suggest changing your code to use the Control IDs to avoid further issues.
If you are still having issues and the information I mentioned hasn't helped, maybe you should post a small project that I could run and see the error. From that I should be able to quickly tell you the problem.
Best Regards,
03-18-2008 11:49 AM