» Developing a VI-Based API » Adding Example VIs to the NI Example Finder
This example documents the process for adding Example VIs to the NI Example Finder. To prepare for this example, please download the .zip archive linked to at the bottom of this document and copy the contents to your LabVIEW directory (the 'examples' folder in the .zip should be merged with the existing examples folder in the LabVIEW directory in order for the examples\ATX\SimpleMath\Simple Math Example.vi file to be in the correct location).
What if LabVIEW doesn't have an exbins folder? For example, LabVIEW 2010
Let's say I created my bin3 file and now I want to update it. How do I do this?
Michael_Aivaliotis wrote:
What if LabVIEW doesn't have an exbins folder? For example, LabVIEW 2010
The exbins folder is required in later versions but backwards compatible in earlier versions. In older versions of LabVIEW, it parsed every folder recursively under LabVIEW\examples. But in 2011 it was limited to the exbin folder in order to help save on load time.
Michael_Aivaliotis wrote:
Let's say I created my bin3 file and now I want to update it. How do I do this?
You don't modify the bin3 when making the changes, instead the utility pulls data from the VIs and LVPROJs and you just need to make the changes in these files and then generate a new bin3 file from the utility.
This process requires the relevant example VIs to be present in the correct location, which for some toolkits will not be the case. I don't ever install PTP Sequencer onto the development environment to ensure I don't get cross-linking issues. Therefore the creation of a bin3 is painstaking and fraught with issues. Any chance NI and JKI can get VIP Builder to create the bin3 on the fly as part of the build process? Would make the whole package-generation much easier 🙂
It's on JKI's roadmap. But the road is very long and winding...
I was expecting this - https://www.youtube.com/watch?v=FkqOnFOZ7W0
Thoric wrote:
This process requires the relevant example VIs to be present in the correct location, which for some toolkits will not be the case. I don't ever install PTP Sequencer onto the development environment to ensure I don't get cross-linking issues. Therefore the creation of a bin3 is painstaking and fraught with issues. Any chance NI and JKI can get VIP Builder to create the bin3 on the fly as part of the build process? Would make the whole package-generation much easier 🙂
I would expect that the right way to do this is to buld PTP as one package and build the examples as a *separate* package that has a dependency on the first. That way you package your build up, deploy it onto your example development machine, develop your examples, and then produce the final package from that. Makes it easier to distribute smaller bug fixes and creates a much smoother development process.
Building the bin3 for files that do not exist is a pretty strong sign in my book that "you're doing it wrong". Breaking things into separate packages helps a lot with this.
Splitting it up into two packages doesn't help here;
The workflow will then be this:
1) Install PTP (without examples, which in theory already violates the LVTN requirements, but exceptions will be made...)
2) Develop the PTP-examples in a dev-folder some other place than vi.lib.
3) Fire up the 'Prepare Example VIs for NI Example Finder' (PrepEx) utility, which requires you to point it to the directory where your example VIs will be once deployed.
4) So, now you have to install the PTP-examples package, and then build the bin3 file with the PrepEx utility.
5) Uninstall the PTP-examples package.
6) Build a new PTP-examples package (which includes the bin3 file).
In the end still two builds of one package has to be done, this time it's just the PTP-examples package. There could still be advantages to separating the examples from the toolset itself, but it doesn't fix the broken workflow of having to build a package two times for one release.
The problem is the PrepEx utility, which demands that its resources are located at the deployment location when it builds the bin3 file. If the PrepEx utility could somehow be pointed to a dev folder and then be told of a deployment location it should take into consideration, then we could develop these examples in one go.
/Steen
The examples #do# exist, I place them in the appropriate locations before running the Prepare VIs for NI Example Finder wizard. However, I have to put them there manually and then remove them afterwards.
Building one solid package is hard enough. Building a second package that's dependent on the first sounds like a recipe for an explosion of complications. I can see the value in your suggestion Stephen, and I'll keep it in mind because it will resolve one of the outstanding issues with the examples (dependency path changes on first load of a freshly installed toolkit), however the panic I'm already feeling when I think about changing anything in my 22 step build process has me breaking a sweat. I think I'll reserve this modification to my next 'good' day
Package builders should not know or care about Bin3 files, where they go, or how they're generated. They just want to pick a few VIs, set a description, categorize them and set them as examples. What happens behind the scenes is not of concern. VIPM already builds palettes for VIs that "don't exist" but somehow it works. VIPM knows the expected paths of the examples and can dynamically generate them as required. Sounds easier than it is though. It's a just a small matter of programming.
How do you add browse paths if not here? Or does everything else just go in "Other"?
Hi.
How can I add a requirement for my example?
The only way I can see is just writing it in 'Example description' section.