Jump to content

[VIPM] How to auto-generate a palette that skips the root directory?


Recommended Posts

I have a project structure like this:

  • <ProjectRoot>
    • (Project.vipb)
    • Examples
      • Example1
      • Example2
    • Source
      • Cpp
      • LabVIEW
        • LVClass1
          • (Method1.vi)
        • LVClass2
          • (Method2.vi)

 

The auto-generated Functions Palette is structured like this:

    [Functions] >> [Company] >> [Project] >> Source >> LabVIEW >> LVClass1 >> Method1.vi
    [Functions] >> [Company] >> [Project] >> Source >> LabVIEW >> LVClass2 >> Method2.vi

 

However, I would like a simplified palette structure like this:

    [Functions] >> [Company] >> [Project] >> LVClass1 >> Method1.vi
    [Functions] >> [Company] >> [Project] >> LVClass2 >> Method2.vi

 

Is there a way to get VIPM to auto-generate the palette that way? I can think of a few workarounds (restructure my project, or add every palette folder manually) but I'm hoping I don't have to resort to them.

 

P.S. Sorry if this is the wrong place to post this, but I'm unable to post on the JKI forums

Link to comment
6 hours ago, LogMAN said:

The palettes are auto-generated based on the source directory defined in the Build Information tab. I suppose it is set to <ProjectRoot>, so change it to <ProjectRoot>/Source/LabVIEW and the palettes should be correct.

D'oh! So simple. Yep, that did the trick.

Thanks!

(I miss the old "Mark as solution" feature from the previous forum)

Link to comment

Darn, I just remembered why I had the *.vipb in the root folder in the first place: I wanted the Source folder to contain my library's API and implementation only, but the Examples are neither so I put them in a separate folder.

Unfortunately, VIPM doesn't let us include things in the package if they're outside the Source Directory (which means I now can't have examples in my package).

I'll downgrade VIPM to see if I can easily modify the *.vipb's XML data after the palette is auto-generated. If not, I guess I'll just have to move my Examples folder... (If you can think of a nicer idea, I'm all ears!)

 

Link to comment

I have made the same experience in the past, tried many things and finally moved the examples folder under LabVIEW sources for a couple of reasons:

  • The example folder contains LabVIEW VIs only (in my case that is), so it makes sense to put them under LabVIEW sources.
  • API sources can be arranged differently than "regular" projects, if there are good reasons for it. However this should be made standard for all APIs!
  • Depending on how many configurations you have to manage (about 20 with regular changes in my case), it is less painful to just accept the standard behavior, than trying to convince VIPM to do otherwise. Or more accurately: You can do this with VIPM, but it is a pain to do for every single package, let alone multiple projects! :frusty:
  • Re-writing the *.vipb requires you to do it every single time, which you will eventually forget!

You could potentially use the VIPM API, if you REALLY want to do things your way (never used it though) :rolleyes:

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.