LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VI shows code and not icon

I have seen this done before and was just wondering how to do it. I have a couple of VI's that I have downloaded from various places and some of them when they are placed on the block diagram, instead of showing up a a subvi Icon they show up as the code. How did they get labview to do that. I am sure it has something to do with the merge VI function.
 
Just asking for more knowledge



Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 1 of 6
(2,422 Views)

It IS the merge VI function. You only need to check it, and if you select the VI from one of the palettes, its code will be merged.

You can get the option by going to Tools>>Advanced>>Edit Palette Views, adding a VI to a palette and right clicking it.


___________________
Try to take over the world!
Message 2 of 6
(2,409 Views)

Thanks tst. The first time I tried it, it did not work. then I looked at the help again and figured out what I did wrong.

Thanks again for the help.

For anyone who is interested here is how I did it. Excerpt from the help file

Merging VIs in a Custom Palette View

You can merge a VI in a custom palette view so when you select the VI icon on the palette, you can place a section of code on the block diagram instead of the single VI icon.

Complete the following steps to merge a VI in a custom palette view.

  1. Create a VI whose block diagram contains the code you want to place on the block diagram when you select the VI icon on the palette.
  2. Save the VI and close it.
  3. Select Tools»Advanced»Edit Palette Views to display the Edit Controls and Functions Palettes dialog box.
  4. Select the custom palette view from the Palette View pull-down menu. The Controls and Functions palettes change to the view you selected.
  5. Navigate to the location on the palette where you want to add the VI.
  6. Right-click the palette and select Insert»VI(s) from the shortcut menu.
  7. Navigate to the VI you want to add to the palette view and click the Open button. The VI icon appears on the palette.
  8. Right-click the VI icon and select Merge VI from the shortcut menu.
  9. Click the Save Changes button in the Edit Controls and Functions Palettes dialog box to save the changes.
  10. Select the VI icon on the Controls or Functions palette and place it on the front panel or block diagram. The entire block diagram of the VI on the palette appears on the block diagram of the current VI.



Joe.
"NOTHING IS EVER EASY"
Message 3 of 6
(2,402 Views)

Here are a couple of useful VIs (7.0) I placed into my structures palette which use the merge option. They help when writing quick code.

Placing VIs in locked palettes can be accomplished by renaming the "readonly.txt" file found in the Menus\palettename folder, but that is at your own risk.


___________________
Try to take over the world!
0 Kudos
Message 4 of 6
(2,379 Views)
Thanks tst,
 
I wanted to place them in the structures pallette but I could not find the correct one, were exactly is it in 7.0 also what about the file what should I rename it to or does it matter. Again as always you have been very helpful.



Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 5 of 6
(2,351 Views)
You can place the files wherever you like. To place them in the structures palette, you need to make the palette view you're using not read-only. This is accomplished by renaming the file readonly.txt found in the LabVIEW 7.0\menus\palleteviewname (and not palletename, like I said before - the locking is done on all palettes). Once you rename it (doesn't matter what to), you can edit the pallets in that view (I have OpenG installed, so I use the dynamic view).

___________________
Try to take over the world!
0 Kudos
Message 6 of 6
(2,347 Views)