Daklu Posted November 7, 2008 Report Share Posted November 7, 2008 ...because the best way is clearly to use VIPM. However, since I don't have that option atm I'm wondering what the second best process is. I'm attempting this using OGPB (OpenG Package Builder), but I'm interested in any solutions people have come up whether or not they use OGPB. What I've done in the past is build my code and put it in the installation directory, then use the Edit Palettes... function from within Labview to create the mnu file. That's really cumbersome to maintain so I'm trying to come up with a solution that allows developers a way to design the palette at design time. My main functionality uses VI Refnums and the newly released Palette VIs to create a mnu file when I run OGB (OpenG Builder) via a post-build vi call. This part works great and correctly handles the build process name mangling and file relocations. Unfortunately the mnu file in my build directory doesn't link to the correct files when I move them to the install directory. (Duh.) When I tried using a similar post-install vi call in OGPB it didn't work, as the post-install vi seems to be executed from a temporary directory and it couldn't find the sub vis needed to build the mnu file. I looked at the OpenG dynamic palette api for a while but couldn't quite make sense of it and didn't find any examples of it being used. Quote Link to comment
Chris Davis Posted November 8, 2008 Report Share Posted November 8, 2008 QUOTE (Daklu @ Nov 6 2008, 06:09 PM) ...because the best way is clearly to use VIPM. However, since I don't have that option atm I'm wondering what the second best process is. I'm attempting this using OGPB (OpenG Package Builder), but I'm interested in any solutions people have come up whether or not they use OGPB. If you can tell us, why can't you use VIPM to make packages? QUOTE What I've done in the past is build my code and put it in the installation directory, then use the Edit Palettes... function from within Labview to create the mnu file. That's really cumbersome to maintain so I'm trying to come up with a solution that allows developers a way to design the palette at design time. My main functionality uses VI Refnums and the newly released Palette VIs to create a mnu file when I run OGB (OpenG Builder) via a post-build vi call. This part works great and correctly handles the build process name mangling and file relocations. Unfortunately the mnu file in my build directory doesn't link to the correct files when I move them to the install directory. (Duh.) When I tried using a similar post-install vi call in OGPB it didn't work, as the post-install vi seems to be executed from a temporary directory and it couldn't find the sub vis needed to build the mnu file. I looked at the OpenG dynamic palette api for a while but couldn't quite make sense of it and didn't find any examples of it being used. You may want to take a look at http://forums.jkisoft.com/index.php?showtopic=857' rel='nofollow' target="_blank">this post from the VIPM forums which kind of explains how the dynamic menu thing worked for OpenG. I'm using this setup now and it works like a charm. Honestly, I was using OpenG Package Builder for a couple of years and was fairly pleased with it until I tried to change something or customize something a little more than I was comfortable with. Then my self built packages started to not show up in the palettes and other problems occurred. The simplest solution I could come up with was to install in the user.lib and provide a dir.mnu in the package for each directory I made under the user.lib palette. This became more and more of an issue when I added or removed things from a palette I had customized in some fashion. Quote Link to comment
hooovahh Posted November 8, 2008 Report Share Posted November 8, 2008 I too have played around with reuse libraries and adding them to the palette properly. A tool you might find interesting is the Palette API which was posted in LAVA some time ago which originally was found on NI's website but it has been taken down since. However the API is still available in the LAVA post. http://forums.lavag.org/LabVIEW-Palette-AP...ased-t8292.html It basically lets you programatically read and write .mnu files. Quote Link to comment
Jim Kring Posted November 8, 2008 Report Share Posted November 8, 2008 QUOTE (hooovahh @ Nov 7 2008, 07:32 AM) I too have played around with reuse libraries and adding them to the palette properly. A tool you might find interesting is the Palette API which was posted in LAVA some time ago which originally was found on NI's website but it has been taken down since. However the API is still available in the LAVA post.http://forums.lavag.org/LabVIEW-Palette-AP...ased-t8292.html It basically lets you programatically read and write .mnu files. It's worth noting that the Palette API ships as part of vi.lib in 8.6, which might be why the code was removed from NI's website (which I haven't confirmed). Quote Link to comment
hooovahh Posted November 11, 2008 Report Share Posted November 11, 2008 Nope you're right Jim. In 8.6 they added it to the Application Control section. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.