Discussion:
LabWindows/CVI Tips 'n Tricks
(too old to reply)
Wendy L
2007-03-13 05:10:18 UTC
Permalink
Hello LabWindows/CVI community members,
 
After receiving multiple requests to collect all LabWindows/CVI tips/tricks in one area, we've decided to create this thread where you can post your tips and read other community-submitted suggestions.  Share your knowledge and learn helpful features of LabWindows/CVI straight from the development team!
 
So what can you do with this thread?
1) Post your own tips/tricks
2) Read tips / tricks submitted by NI developers
3) Link to any helpful discussion forum threads as you find them
 

How should I post to this thread?
1) Please change the subject line of your response to indicate the topic of the tip/trick.
2) Please indicate the lowest version of LabWindows/CVI that the tip/trick works with (if known)
 
The key to the success of this thread is making sure any tip/trick you find or use on a regular basis is posted to this thread.  If you find an answer in another thread that you feel would be helpful to the general LabWindows/CVI community, posted a link to that thread here.
 
Cheers! 
Wendy L
2007-03-13 05:40:13 UTC
Permalink
Interactively Change the Settings of Multiple Controls
 
Starting with LabWindows/CVI 8.1, you can select multiple user interface controls of the same type and edit them simultaneously.  Select multiple controls on the User Interface Editor and choose Edit>>Controls or double click the controls to open the Edit Control dialog box.
 
<img src="Loading Image...">
&nbsp;
Minimum Version: 8.1
&nbsp;
&nbsp;
ThanksMessage Edited by Wendy L on 03-13-2007 12:26 AM


cvieditcontrols.gif:
http://forums.ni.com/attachments/ni/180/28263/1/cvieditcontrols.gif
Roberto Bozzolo
2007-03-13 15:10:21 UTC
Permalink
Handling menu items state depending on application state
In several applications it's common to have well-structured menu bars that collect useful functions in the program. Normally, not all menu items can be executed in every program conditions: you may want to avoid taking a copy of test data while a test is still running to prevent the risk of accessing the same data file from two operations; again, you may want to permit starting a test only after an explicit confirmation that testing conditions are safe; even more, you cannot start a test which is already running ( :smileysurprised: ), and so on.
Individual menu items can be dimmed with SetMenuBarAttribute (, , ATTR_DIMMED, ) when operating conditions change; a disadvantage in doing this is that in every single moment in the program you detect a change in operating conditions you must proceed to dim / undim all menu items interested by this change: this can be long and boring and you may run the risk of forgetting some particular precaution and place the application in an unforeseen (possibly dangerous) state. Moreover, all these operations are performed even if not necessary.
CVI offers an easy and elegant instrument to centralize all menu handling, that additionally adds no unnecessary overhead to the application since it is executed only when the operator fires up the menu bar. This instrument is
InstallMenuDimmerCallback (menuBarHandle, MenuDimmerFunction);Being called before the menu shows, in MenuDimmerFunction we can individually show or dim individual menu items depending on program working conditions thus being sure that every time the operator is presented with all and only legal items.
Attached sample shows a very simple example of this functionality.Message Edited by Roberto Bozzolo on 03-13-2007 05:08 PM


Menu.zip:
http://forums.ni.com/attachments/ni/180/28271/1/Menu.zip
Wim S
2007-03-20 09:10:16 UTC
Permalink
Hello all,
unfortunately, Labwindows has no support for the mouse wheel, which is nowadays commonly used in applications.&nbsp;When using textboxes in the user interface, I think that most users automatically think that the mouse wheel can be used to scroll this textbox up and down (so would I). So I wrote a piece of code that I now include in all my projects to support this request. It's actually quite simple. For each panel that gets loaded, I use the InstallWinMsgCallback function, with the MessageNumber parameter set to WM_MOUSEWHEEL.
Important note: for WM_MOUSWHEEL to be defined, windows.h should be included, and _WIN32_WINNT should be at least defined to 0x0400. To make sure this last definition is made, open the Build Options window (can be found in the Options menu), and enter /D_WIN32_WINNT=0x0400 in the "Compiler Defines" field.
I attached an example program to this message, which shows how to enable textbox scrolling with the mouse wheel in a very simple way. More information on the WM_MOUSEWHEEL message number can be found in the MSDN library:
<a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/mouseinput/mouseinputreference/mouseinputmessages/wm_mousewheel.asp" target="_blank">http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/mouseinput/mouseinputreference/mouseinputmessages/wm_mousewheel.asp</a>
I hope this post is usefull for at least some of you guys :smileywink:


MouseWheel.zip:
http://forums.ni.com/attachments/ni/180/28367/1/MouseWheel.zip
Roberto Bozzolo
2007-03-21 10:10:17 UTC
Permalink
A few accelerators are present in the IDE that can help a lot in developing applications.
Everybody knows that in the UIR editor right-clicking on a control popups a menu&nbsp;by which it's possible to jump directly to control's callback (item "View control callback").
The symmetric action from&nbsp;a source code window is to place the cursor on a control name and press Ctrl-F: you will jump into the UIR editor window with the stated control already selected. This option is equivalent to right-clicking on the control name and select "Find UI object" option).
I recently discovered that this option is present on callback function names too: selecting the function name and pressing Ctrl-F jumps me to the UIR editor window :smileyhappy: If the function is associated to more controls, a popup window will be shown with the list of controls for we to select the desired control to select.
Wendy L
2007-03-13 05:40:13 UTC
Permalink
Hello everyone,
This is a tip that I've seen posted on a few forum threads but I wanted to include it here:
Improving the Performance of Table Controls

1. Try to update multiple cells at the same time with SetTableCelRangeVals function.&nbsp; This reduces the overhead of updating cells greatly.
2. If you need to update a single cell at a time (as may be the case if you want to update a row with different datatypes, use the SetTableCellAttribute (...,ATTR_CTRL_VAL,...) function instead of the SetTableCellVal function.&nbsp; Note: This will only make a difference if the table is not the active control on the panel.&nbsp; So if it is the active control, programmatically make another control active before updating the table, and then make the table active again.&nbsp; This will update the table without displaying the updates until the next call to ProcessDrawEvents or upon the&nbsp;exiting the current callback.&nbsp; This is ideal when making repeated updates.
Original forum post:

SetTableCellRangeVals using for loading rows: <a href="http://forums.ni.com/ni/board/message?board.id=180&amp;message.id=21055" target="_blank">http://forums.ni.com/ni/board/message?board.id=180&amp;message.id=21055</a>&nbsp;
Using SetTableCellVal() in LW/CVI to display about 20000 lines of data. But the speed is very slow,how can I improve it?: <a href="http://forums.ni.com/ni/board/message?board.id=180&amp;message.id=6577" target="_blank">http://forums.ni.com/ni/board/message?board.id=180&amp;message.id=6577</a>
&nbsp;
Thanks
Ian W
2007-03-15 16:10:18 UTC
Permalink
"Hidden" features in the CVI IDE
There are a few features in the CVI Interactive Development Environment (IDE) that took me a while to discover, simply because I stuck with my old workflow habits. Make sure you know how to put these to good use:

- Options &gt; Environment &gt; Auto hide Project and Library Trees

- Tools &gt; Preprocess Source File to easily see what is being "#include"ed when your source compiles

- Ctrl-Tab to cycle between source code files.

- The "Programmers ToolBox", particularly for string and filename manipulation.&nbsp;&nbsp; To load it choose Library &gt; Customize &gt; Browse; then navigate to ..&lt;cvidir&gt;\toolslib\toolbox\toolbox.fp

- Right-click on just about anything in your source code and choose the "Browse Identifier".&nbsp; Very powerful to see where variables are used and declared, and which functions call what.
Ian W
2007-04-13 14:10:20 UTC
Permalink
Eren,
Thanks for the question. It shows how we all have different workflow practices. Due to time limits I could not go back and edit the post, so here is the much-needed clarification:&nbsp;

- When the "View &gt;&gt;Window Confinement Region" option is selected in the workspace window, then the "Autohide Project and Library Trees" causes the left pane with those trees displayed to collapse to the left, leaving a larger screen space to edit the source, uir, etc. (Display of those trees is enabled through the View menu in the workspace window.)

- When the "View &gt;&gt;Window Confinement Region" option is selected in the workspace window, Ctrl+Tab cycles between open source and uir file windows.

- And finally, the "Tools &gt; Preprocess Source File" is available only when editing a .C source file (i.e. that window has input focus).

--Ian
P.S. These features are&nbsp;certainly available in version 8.0, and were I believe introduced in 7.0 or 7.1.Message Edited by Ian W on 04-13-2007 09:54 AM
ebalci
2007-04-13 11:40:14 UTC
Permalink
Using "Set Next Statement" to decide the next line to execute during debugging
&nbsp;
In CVI 8.0.1, when you are running&nbsp;your code in debug configuration,&nbsp;after you hit a breakpoint you can freely choose the next line that will execute.
&nbsp;
Simply place the cursor on the next line you want to execute and press Ctrl+Shift+F7 or select it from Run menu.
You will see the execution highlight moving to that line and if you press F8 or F10 to single-step, only&nbsp;that line will execute.
&nbsp;
Together with debug-time variable editing (that always existed) this provides great flexibility during program development and saves a lot of time since you do not have to run the program from the begining to try a new variable value.
&nbsp;
I could not see this in version 6.0, but I am not sure in exists in 7.x
ebalci
2007-04-26 14:40:19 UTC
Permalink
One&nbsp;can use SetCtrlAttribute to change the color of a control and even make it transparent.
This is also possible in design time. It is the leftmost&nbsp;cell in the bottom (grayscale) line in the color palette.
&nbsp;
There is a&nbsp;letter 'T' over there. If you click it, every control you click afterwards with the paintbrush will become transparent.
Together with assigning transparent color for a .ico or .png files this possibility helps you to&nbsp;design better looking UI designs.
&nbsp;
In the attachments, palette.bmp shows the location of the T in the palette and before/after.jpg shows 2 picture command buttons before and after applying transparency.
Finally they become round and octagonal command buttons and they look good on the UI.


after.jpg:
Loading Image...


palette.jpg:
Loading Image...


before.jpg:
Loading Image...
Roberto Bozzolo
2007-05-25 13:40:32 UTC
Permalink
When trying to design a graphical user interface for an application of mine I came into <a href="http://forums.ni.com/ni/board/message?board.id=180&amp;message.id=4729&amp;query.id=227229" target="_blank">this suggestion</a> from LuisG that in my opinion it's worth a mention into this thread.
&nbsp;
Luis has published some undocumented attributes of ring controls that may come in handy especially for larger controls as they permit to alter the dimensions of up and down arrows for ring controls which normally keep original size even when using larger fonts. Here an example of the results:
<img src="Loading Image..."> Message Edited by Roberto Bozzolo on 05-25-2007 03:38 PM


Undocumented attributes.PNG:
http://forums.ni.com/attachments/ni/180/29568/1/Undocumented attributes.PNG
ebalci
2007-07-26 05:40:15 UTC
Permalink
If you are experiencing problems on integrating your CVI application in its target environment (which is probably not your local code development PC) this facility might be a life saver for you.
&nbsp;
It enables you to debug your code, either DLL or EXE, while it is running on your target environment (computer&nbsp;and hardware) as if it is running on your local PC.
&nbsp;
Together with Windows XP Remote Desktop tool, remote debugging might help you understand what is going wrong in your code without leaving your safe cubical/room/etc.
All you need is a TCP/IP connection between the two computers (local: one&nbsp;with the&nbsp;development environment and debugger and target: one&nbsp;with your test hardware).
&nbsp;
To start remote debugging you need to:
(you can do all these from your local computer through Remote Desktop)

- Copy the ConfigureRemoteDebugging.exe file from your CVI/bin directory to the target computer and execute

- Type in your local PC's IP address which you can get using the ipconfig command in DOS prompt

- In the local PC, open the project and build a debuggable EXE/DLL and copy it to the target.

- From the CVI menu go to Run&gt;Switch Execution Target&gt;Select Target with Options. Type your target computer IP address.

- From the CVI menu go to Run&gt;Debug.

- Run your application in the target computer. If it is a DLL run the program that uses it.

- If the connection is successfull you have all the debugging facility of CVI in your hands while your code is running in your target hardware.

For a more complete guide you can&nbsp;read the Remote Debugging topic in CVI help.Hope this helps.
kannappan
2007-04-21 16:10:15 UTC
Permalink
Hi all,i am having a interview in labwindows cvi and test stand&nbsp;,i just want to know what may be the general question asked during interview.i am having just 7months experience in labwindows cvi and teststand....
Waiting for your replyy
Byee
Guillaume Dargaud
2007-04-23 13:06:48 UTC
Permalink
If I were an interviewer I'd ask: "what's the difference between C and CVI",
or "what's the difference between LabView and LabWindows", or "What types of
files do you need in a simple graphic program", or "Outline a program to fft
a signal"...

But then again I'm only an engineer...
--
Guillaume Dargaud
http://www.gdargaud.net/
ebalci
2007-08-30 19:40:20 UTC
Permalink
Although the default control labels and text messages of a LabWindows/CVI UIR are single-line,
you can make them multi-line by pressing &lt;Ctrl&gt; + &lt;Enter&gt; in the text edit mode while creating your UIR using the editor.
&nbsp;
This way you do not need to put two text message controls or use a list box to display a simple 2-line message.
A sample UIR appearance is attached.


multiline text.jpg:
http://forums.ni.com/attachments/ni/180/31139/1/multiline text.jpg
Mert A.
2007-08-31 19:40:14 UTC
Permalink
Having trouble finding your "Executable to Run After Setup" distribution kit option since upgrading to version 8.0 or later?&nbsp; Not to worry -- it's still there, but just a little less visible. On the Files tab of the Edit Installer dialog, if you right-click a file in the installation browser, you will see a "&lt;Filename&gt; Options..." menu item which will bring up a dialog with options for that particular file.<img alt="" src="file:///C:/Documents%20and%20Settings/makinc/Desktop/menu.PNG"><img alt="" src="file:///C:/Documents%20and%20Settings/makinc/Desktop/menu.PNG"><img alt="" src="file:///C:/DOCUME%7E1/makinc/LOCALS%7E1/Temp/moz-screenshot-5.jpg"><img alt="" src="file:///C:/DOCUME%7E1/makinc/LOCALS%7E1/Temp/moz-screenshot-6.jpg"> <img src="Loading Image..."> You can also double-click the file or press Enter to access the dialog.<img src="Loading Image..."> If the file is a runnable file, like an .exe or .bat file, the dialog will expose the option to run the file after installation and/or during uninstallation.&nbsp; You can also provide command line arguments to pass to the file, which may include symbolic variables like %dest or %src (see the help for details) that are expanded into concrete values at run-time.&nbsp; The dialog exposes other options, such as installing the file as read-only, hidden, or system, or registering the file as an ActiveX server.&nbsp; The path at the top of the dialog shows you where the file will be copied from when you build your distribution.&nbsp; Double check this path if the browser displays your file in red, indicating that it can't be located at the expected path.Mert A.National Instruments<img alt="" src="file:///C:/DOCUME%7E1/makinc/LOCALS%7E1/Temp/moz-screenshot-3.jpg"><img alt="" src="file:///C:/DOCUME%7E1/makinc/LOCALS%7E1/Temp/moz-screenshot-4.jpg"> Message Edited by Mert A. on 08-31-2007 02:27 PM


menu.PNG:
http://forums.ni.com/attachments/ni/180/31169/1/menu.PNG


dialog.PNG:
http://forums.ni.com/attachments/ni/180/31169/2/dialog.PNG
LuisG
2007-09-04 16:10:15 UTC
Permalink
Programmers sometimes like to add some standard documentation before each function definition. I'd like to highlight a couple of options in this area: 1. If you'd like your function documentation to be available from the prototype tooltip (see prototype.jpg, attached), there are a number of tags you can add immediately above your function. For an example of this, open samples\networkvariable\quality\nvquality.cws. Before most functions, you can see triple-slash (///) tags, such as HIFN and HIPAR. These tags tell the CVI compiler to include the corresponding documentation in the browse information. For example, after building that project, type "TypeToString (" and then hit &lt;F1&gt; to see the documentation.If you search the CVI help for 'HIFN' you can see a description of the syntax of each tag.2. If instead of using the HIFN and HIPAR tags, you'd like to have your own standard documentation -- something like this, for example://************************************************// Function: &lt;MyFunc&gt;// Description:////////************************************************I would suggest recording a macro that you can use to insert this template with a single keystroke. I'm attaching here a macro that you can import into CVI (click Tools&gt;&gt;Source Code Macros&gt;&gt;Manage and then click Load to load the macro, and then double-click on the macro to assign it a shortcut key), and which creates this particular template.Of course you'll probably want to create your own template, in which case you can record your own macro. You can do so from the Source Code Macros sub-menu (hint: in order to insert the appropriate function name in the comment block, you can select the function name while you're recording the macro, then copy it to the clipboard, and then paste it into the comment block).Luis


macro.ini:
http://forums.ni.com/attachments/ni/180/31195/1/macro.ini


prototype.JPG:
Loading Image...
az_MAS
2007-10-11 07:10:16 UTC
Permalink
Hi everyone. I'm new in this filed and I&nbsp;need guide on this. I'm grateful for any advice. Thanks in advance.
&nbsp;
I use NI PCI 485/8 to monitor quite a numbers of instruments.I already&nbsp;tested my devices using RS 232-RS 485 converter and it work. I connected both A &amp; B device pins to the A &amp; B pins&nbsp;at the converter.
&nbsp;
However, the correct data response that&nbsp;I&nbsp;get from&nbsp;one of my device&nbsp;using NI card is actually&nbsp;from&nbsp;the A (device) to pin 5&amp;9 (port connector)&nbsp;and Gnd device to pin 4&amp;8 (port connector). I'm not sure why this happened because I already referred to the pinouts for NI serial interface connectors. Moreover, if&nbsp;&nbsp;I&nbsp;set the port to be&nbsp;other than RS 485-4&nbsp;wire in labview or MAX,&nbsp;&nbsp;the&nbsp;program&nbsp;will not work. But actually I'm using RS-485 2-wire.
&nbsp;
For another instrument,&nbsp;I tried to make the connection as&nbsp;I did before and even after swap the wire to each other (A,B,G)&nbsp;, still doesn't give&nbsp;me the right response. I'm not sure which part that&nbsp;we did wrong here.&nbsp;Please let me know if we miss on something else.
&nbsp;
Thanks
Roberto Bozzolo
2007-10-11 07:40:18 UTC
Permalink
Hi, az_MAS, this thread is intended as a reference for particular programming tips that CVI&nbsp;users want to share. If you have a particular question you will find more attention creating a new thread instead.
Since your question is related to RS-485 and labview I suggest you to re-post it either in the <a href="http://forums.ni.com/ni/board?board.id=140" target="_blank">Instrument Control</a> board or the <a href="http://forums.ni.com/ni/board?board.id=170" target="_blank">LabVIEW</a> board
gvan
2007-11-01 13:40:12 UTC
Permalink
Glenn,
&nbsp;
You can use the "InstallSysTrayIcon" function in CVI to add a system tray icon.
You can use&nbsp;&nbsp;SetPanelAttribute(panel, ATTR_HAS_TASKBAR_BUTTON, 1); to add the panel the task bar.
&nbsp;
No python or extrernal dependencies required.
&nbsp;
Alternatively you&nbsp;can&nbsp;get the&nbsp;windows handle&nbsp;for the panel (ATTR_SYSTEM_WINDOW_HANDLE)&nbsp;and then use it&nbsp;the windows SDK functions to do&nbsp;anything windows&nbsp;can do&nbsp;including docking, move, resize, etc,etc.&nbsp;&nbsp;This works fine for most parent&nbsp;windows but has problems with child&nbsp;windows. CVI child windows&nbsp;do&nbsp;not behave the same&nbsp;way as their parents... typical of most children.
&nbsp;
Greg
gvan
2007-12-28 14:40:11 UTC
Permalink
Howto Add cursors to a strip chart.
&nbsp;
Cursors on a strip chart can be very useful, but are not implemented in the strip chart control.&nbsp; I use cursors on my strip charts to measure average real-time signal amplitude, offset, etc.&nbsp; I also pause the plotting data to then measure time periods and frequencies without have to "chase" the data across the screen.&nbsp;
&nbsp;
You can add cursors by placing a Graph control on top of the plot area of the strip charts.&nbsp; Turn off all of the labels, gridlines and borders on the graph and set the background color to transparent.&nbsp; Now only the cursors on the chart are visible.&nbsp; You will, of course,&nbsp;have to resize the graph every time you resize the chart to keep it exactly covering the PLOT_AREA of the strip chart.&nbsp;
&nbsp;
To read the cursors values from the strip chart (and not the graph), set the scale of all axes on the graph to min = 0, &nbsp;max =&nbsp;1.0,&nbsp;gain = 1.0.&nbsp; The value of the strip chart at the cursor&nbsp;position for a vertical axis&nbsp;is then,
&nbsp;
Stripchart_Axis_min+ (Stripchart_Axis_Max - Stripchart_Axis_min)*cursor_position_for_axis.
&nbsp;
To get the cursor value of the scrolling x axis is&nbsp;a little different.&nbsp; XAXIS_OFFEST + (POINTS_PER_SCREEN*cursor_position_for_axis)*XAXIS_GAIN.
&nbsp;
I rarely display the absolute cursor position and therefore I don't add the XAXIS_OFFSET or have to worry about changing the cursors value as the data scrolls.&nbsp; Usually the delta between cursors is most important in my applications and this mention of adding cursors works exactly as required.&nbsp;
&nbsp;
I update the cursors values in a label or number control either with a Timer, when I plot new data or (most often) only when the user moves them (EVENT_VAL_CHANGED).
&nbsp;
Greg
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
LuisG
2008-02-15 19:10:12 UTC
Permalink
Every now and then, CVI users report a crash in the CVI environment, or in a CVI program that can't be explained by what the program is doing. If this crash can't be reproduced reliably, it's usually very hard for us here at NI to investigate the root cause of it. When that happens, a useful thing to do is to generate a crash dump and attach it to your bug report. The thing to keep in mind is that you have to suspect that a crash might be coming at some undetermined time in the future and enable the Windows debugger for dump generation before the crash happens.
&nbsp;

Here's how you can have Windows create a crash dump:
&nbsp;
Windows XP
&nbsp;
1. Run c:\windows\system32\drwtsn32.exe -i
(this will register Dr. Watson as your "just in time" debugger)
&nbsp;
2. Whenever you get a crash and you see the "Please tell Microsoft about this problem..." dialog, click "Don't Send".
&nbsp;
3. Browse to the C:\Documents and Settings\All Users\Application Data\Microsoft\Dr Watson folder. The dump and log files are there. Keep in mind that if you have a second crash, it should overwrite the previous dump.
&nbsp;
Windows Vista
&nbsp;
Dr. Watson is not available in Vista, and its replacement (Windows Error Reporting) is very flaky, when it comes to generating crash dumps. So your best bet is to use windbg.
&nbsp;
1. Install the <a href="http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx" target="_blank">Windows debugging tools</a>.
&nbsp;
2. Run C:\Program Files\Debugging Tools for Windows\windbg.exe -I
(this will register&nbsp;windbg as your "just in time" debugger)
&nbsp;

3. When you get a crash, windbg should start up automatically.&nbsp;At that point, in to its command window type .dump /ma c:\temp\mydump.dmp to generate the dump file.
&nbsp;

Note that this is still not as useful as specific instructions for reproducing the crash, but if that isn't possible, then this is definitely worthwhile.
&nbsp;
Luis
&nbsp;
&nbsp;
Mohan
2008-02-21 00:40:17 UTC
Permalink
The colors used in the CVI source editor can be customized to your preference using the&nbsp;Options &gt;&gt; Colors menu item.&nbsp;CVI stores this customization in the HKCU\Software\National Instruments\CVI/[version]\ColorPreferences registry key - so if you want to share your customization or use the same colors on multiple machines, then you can do so by exporting and importing this key.
&nbsp;
Nowadays, I prefer a&nbsp;dark&nbsp;color scheme, and so customized my CVI 8.5 installation. I am attaching my customization in case anyone wants to check it out. This may be a good thread in which to share other interesting colorschemes for the CVI source editor.


mohan_dark_cvi85_colors.zip:
http://forums.ni.com/attachments/ni/180/33941/1/mohan_dark_cvi85_colors.zip
ebalci
2008-02-22 12:40:11 UTC
Permalink
Nomore do you have to carry the uir file side&nbsp;by side with the executable!
&nbsp;
You can embed it directly into your executable and use just a single file to distribute your project, as most Windows users are accustomed to.
Simply check the "Embed project UIRs" box in menu Build&gt;Target Settings... on the project window.
&nbsp;
Here is an excerpt from the offical help text:
&nbsp;
"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 through LoadPanel 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"
&nbsp;
I know this feature is available in 8.0.1 but not in CVI 6.0. I do not know about 7.x versions.Message Edited by ebalci on 02-22-2008 02:20 PM
Wendy L
2008-04-01 22:10:11 UTC
Permalink
Hello CVI community,
&nbsp;
Thanks for sharing your tips and tricks on this forum thread.&nbsp; After listening to your feedback about the challenges of maintain a collaborative exchange of tips/tricks on a discussion forum thread, I have migrated the CVI Tips/Tricks to the new ni.com/community.
&nbsp;
<img src="Loading Image...">
&nbsp;
This new wiki-based community allows you to:
1) Add CVI Tips / Tricks and Example Code using the same system
2) Have individual documents for each tip/tricks
3) Edit/expand existing tips/tricks (with no timeout on edits)
&nbsp;
&nbsp;
Best Practices:
1) Required: Make sure to categorize all CVI tips/tricks/example under the LabWindows/CVI product category
2) Recommended: Please append the string "LabWindows/CVI Tip" to all CVI tips/tricks
&nbsp;
Track New Tips/Tricks:
Based on RSS technology, you can now&nbsp;view and track&nbsp;new LabWindows/CVI Tips/Tricks in the following web widget:
<a href="http://zone.ni.com/devzone/cda/tut/p/id/6518" target="_blank"></a>&nbsp;
<a href="http://zone.ni.com/devzone/cda/tut/p/id/6518" target="_blank"><img src="Loading Image..."></a>
&nbsp;
&nbsp;
Thanks!!Message Edited by Wendy L on 04-01-2008 04:50 PM


CVIWidget1.jpg:
http://forums.ni.com/attachments/ni/180/34864/1/CVIWidget1.jpg

Loading...