Jump to content

Second best way to create and install palettes for reuse code...?


Recommended Posts

...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.

Link to comment

QUOTE (Daklu @ Nov 6 2008, 06:09 PM)

If you can tell us, why can't you use VIPM to make packages?

QUOTE

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.

Link to comment

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.

Link to comment

QUOTE (hooovahh @ Nov 7 2008, 07:32 AM)

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).

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.