LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error while modifying icon and name in the subpalette

Hi.... I have made three subVIs and want to distribute as LabVIEW library.
I made a llb file and added all three sbVIs in that. And put it in user.lib. In all three dll there are Call Library Function means I have one dll. I have put this DLL in the use.lib folder.
Problem:
The icon and name of my application in the LabVIEW "User Libraries" pallete are default. I want it to set automatically set to my desire icon for that subpallete and desire name as well. How can I do that?

I am using LabVIEW 6i. I tried to change the icon and name. And I tried according to following link and in the third step it says
"Right-click an icon in the custom view and remove the checkmark next to Synchronize with Directory in the shortcut menu."
But that option is greyed out, how can I remove checkmark against that.
http://digital.ni.com/public.nsf/3efedde43...enDocument#rank
I also tried to rename readonly.txt file in default folder in menu folder. I tried to add in default folder but it does not sucess. It is always giving error that please check the read only attribute.



One Dll is used in all three subVIs. When I set relative path ".\MY_DLL.dll" in the configuration of Call Library Function then it is chaging it to absolute path automatically.
I want it relative so that when user put my_llb.llb file and my_dll.dll file into user.lib folder then it will automatically take that dll instead of searching for that DLL in the nearest location. What should I do?
Do I require to buy Application Builder for that-specially for setting my own icon & name for "subPallete" of my library.
Thanks in advance......

0 Kudos
Message 1 of 4
(3,042 Views)
Hi,


If I understand your problem correctly, you would like to programmatically edit your palette in LabVIEW 6i.  I unfortunately do not think you can programmatically edit and make a custom palette in LabVIEW 6i, however my resources regarding that version are very limited.  To create a custom palette in LabVIEW 6i, I have found a few KBs that talk about this.  In regards to your KB, it was directed to LabVIEW 7.0 users.  Here are the KBs that direct you to change your palette accordingdy.  How Can I Change My Palette Set in LabVIEW 6.0?  and  Adding Custom Icons to the Functions Palette


I hope this helps,


Regards,

Nadim
Applications Engineering
National Instruments
0 Kudos
Message 2 of 4
(3,009 Views)

Thanks Nadim..

Sorry for my poor explanation. But I don't want to edit palette programatically.

Let me tell you again. I got one .llb file . and I want to distribute it. When user copy that file to user.lib directory and open LabVIEW it will automatically add sub pelette for that. but

The icon is default and name of that sub palette is "paletteMenu" which is also default created by LabVIEW. I want to set my icon and name. So when ever user will copy my DTM_LC.llb file into user.lib folder and will open the LabVIEW/function palette then he will find one Sub Palette with my icon which was set by me and name of that sub palette that  I have given.

First, I was trying to edit myself in my Function Palette but it was giving error that "Readonly" attribute is set. and don't allow me to save. I tried to make a new .mnu file and it allows me to save the edited palette. Now what should I do to distribute this library. Do I require to distribute this .mnu file as well. And if I do so, then isn't it will replace existing .mnu file at the user's PC?

Thanks again...

 

0 Kudos
Message 3 of 4
(2,999 Views)
Hi,

Here are step-by-step instructions on how to insert a custom sub-palette in the Instrument Drivers or User Libraries palettes in LabVIEW 6.0 and above.
  1. Save one of the VIs required for the instrument driver as a library (*.llb):
    • Select File»Save or Save As to display the Name the VI dialog box.
    • Click the New VI Library button to display the New VI Library dialog box.
    • Enter the name of the new library and click the VI Library button. LabVIEW automatically adds a .llb extension to the name of the library.
    • The Name the VI dialog box reappears. Enter the name of your VI to save it in the new library.
  2. Close LabVIEW.
  3. Browse to the directory where LabVIEW is installed and open the "instr.lib" folder to insert a new menu into the Instrument Drivers palette (or the user.lib for the User Libraries palette). Create a new folder and name it appropriately. Copy the .llb file into that new folder.
  4. Open LabVIEW and open a new VI. Pin down the palette by right clicking and clicking on the push-pin on the upper left hand corner so that the palette is fixed on the screen. Then click on the Options button on the toolbar at the top.
  5. Select the "Edit Palettes..." button. Navigate to the Instrument Drivers palette and right click on the icon with the name of the folder that you created. Select "Delete Submenu".
  6. Right click on an open area on the palette and select Insert»Submenu. When prompted, select "Create a new menu file (.mnu)". Save this in the folder that you created in step __. (Remember to type the .mnu file extension on your file name) Typically this mnu file is named dir.mnu. When prompted, enter the name for the submenu, and select ok.
  7. Open the new submenu. Now you can insert VIs (by right clicking in the empty space and going to Insert»VI and selecting it from the .llb file) or additional submenus as you desire. When creating new submenus, it is recommended to create a new .mnu file for each submenu and save it in the folder you created.
  8. Next you can edit the icons for the submenus by right clicking and selecting Edit Submenu Icon.
  9. When you are finished, select "Save Changes" from the "Edit Controls and Palettes" dialog box.
  10. To port the new menu in the Instrument Drivers palette onto another computer with LabVIEW, just copy the folder (and its contents) that you created and paste it into the instr.lib folder. When LabVIEW is loaded it will see the new folder and load the menus.


Note: If you save the changes and return to add more submenus you may receive an error instructing you to check the read-only properties. To fix this, begin the editing process. Then right click on the menu that you created in the Instrument Drivers palette and select "Synchronize with Directory" so that the check mark beside it disappears. This will allow you to save your changes. For more information on this see the related link below.

I hope this helps,

Regards,

Nadim
Applications Engineering
National Instruments
0 Kudos
Message 4 of 4
(2,984 Views)