Developer Center Resources

cancel
Showing results for 
Search instead for 
Did you mean: 

VI to XML Documentation Tool

LabVIEW Add-on Dev Center » Product Documentation » VI to XML Documentation Tool

 

Requirements

  • LabVIEW 2010 or later (for Windows, not tested on OSX)
  • VI Package Manager from JKI
  • ActivePerl Community Edition: http://www.activestate.com/activeperl/download (ActivePerl x86 version 5.12.4.1205, even if you're running 64-bit Windows)
    • The API broke version to version, but it appears you can copy C:\Perl\lib\XML in the latest build over to \LabVIEW 2013\project\VI Documentation\_VI2XMLTool\_shared\XML and overwrite the common files to resolve the expat errors.
  • HTML Editor: I use Kompozer
  • CHM Compiler: I recommend FAR, it has a wizard to create the CHM from html and is easy to use

 

Installation

To install the VI Properties Editor package, you will first need to install VI Package Manager (VIPM) from JKI.  Once VIPM has been installed, simply download the attached .vip file below, double-click, and follow on-screen instructions to complete the install.

 

Once the install through VI Package Manager is complete, restart LabVIEW to refresh the menu options.

 

How-To

  1. Launch the VI to XML Documentation Tool from the LabVIEW Tools menu (Tools > VI Documentation > VI to XML Documentation Tools...)
    VI to XML 1.png
  2. There are three utilities included in the VI to XML Documentation Tools:
    VI to XML 2.png
  3. The general process for using these tools is to:
    1. Use Generate Files to create a set of XML documents describing your VIs, which populates with information from the VI properties and .mnu palette files.
    2. Use Transform XML to HTML to create a set of HTML documents from the XML generated in step 1 and use an HTML Editor and CHM tool to create your .CHM from this HTML source
    3. Call Transform XML to HTML again, only this time generate a set of text files instead of HTML
    4. Use Import to VIs to update the VI properties to link to your CHM document with the correct Help Path and Help Tag

      Note: This set of tools was taken from a larger toolset and I realize the process/workflow leaves a lot to be desired, but I've not had a chance to dig too far into the code yet.

  4. Generate Files
    1. Begin by tagging the VIs you want to document
      VI to XML 3.png VI to XML 4.png
    2. The Tagger window will ask you to provide a folder of source VIs, then tag those you wish to document
    3. When finished tagging, click 'Finish' and you will return to the Generate Files window

    4. Add the 'topLevel=True' tag to the XML file created for the top-level palette file using Notepad++
      VI to XML 7.png

  5. Select the folder of tagged source VIs and if you're creating documentation for a palette, include the top-level .mnu file for your palette

  6. Specify a location to save the XML files and click Generate.  Select Close when the status indicates the process is complete.

  7. Open Transform XML to HTML and select the directory containing your generated XML, copy and paste this path as the 'Path to XSLs', and then enter the title for your Help Table of Contents page
    VI to XML 5.png
    Click Transform
  8. Use an HTML Editor to modify the HTML documents created by the utility.  You may find the order of controls & indicators is incorrect and will need to reorder these listings.

    Note: One issue with the generated HTML is the image used for error clusters needs to be changed to use the yellow error cluster .gifs instead of the pink cluster .gif
    ccclst.gif to cerrcodeclst.gif  and  icclst.gif to ierrcodeclst.gif
    (ccclst to cerrcodeclst and icclst to ierrcodeclst)

  9. Using FAR HTML or another CHM compiler, create your .CHM document from the generated HTML files

  10. Use Import to VIs to update the Detailed Help links for each of the VIs in your API
    VI to XML 6.png
    Note: If you plan to use the LabVIEW\help\ directory for your help file, be sure to use the <helpdir>: pseudo path.  By installing your .chm to the LabVIEW\help\ directory, the LabVIEW > Help menu will auto-populate with your help document upon restarting LabVIEW.

 

 

Limitations & Known Issues

  • Need to update the utility to streamline the documentation process a bit more
  • Resolve issue where order of controls and indicators is incorrect
  • Replace cluster images with error code cluster images
  • Under 'Generate Files', you may need v5.12.4.1205 of ActivePerl (x86) on 64-bit systems.

 

Support

Please post a comment below to report an issue.

 

Third-Party Tools

Check out the following third-party tools for creating documentation for LabVIEW APIs and applications:

Comments
viScience
Active Participant
Active Participant
on

Nice tool.  I wonder why something as useful as this is not built into the LV IDE.

RDR
NI Employee (retired)
on

There are some documentation tools built into the LabVIEW IDE (File > Print) but they do not output the same format as one would see in existing CHM documents -- I also recommend checking out these tools on the LabVIEW Tools Network as they do not have a dependency on FAR or ActivePerl like the tools above:

 

 

If you go to the LabVIEW Tools Network and search for 'help document' both of these come up.

 

-RDR

Igor_Titov
Member
Member
on

I would argue that HELPer (http://vigods.com/toolkits/HELPer/helper.html) is a much more easy and powerful tool to use. Try it out too.

=========================
Igor Titov, ex-CLA
ex-Labicom.net, ex-CERN, etc.
drjdpowell
Trusted Enthusiast Trusted Enthusiast
Trusted Enthusiast
on

Tried this in LabVIEW 2017, but the tagging part didn't seem to work (i.e. the tags didn't register if one re-scanned the directory).

Avinaash
Member
Member
on

Hello RDR, this post looks interesting of all help documentation tools. Thanks for the post!

I tried this today but I'm unable to tag VIs. I selected VIs to document in tagger window and clicked create report. I got File not found error (C:\Program Files (x86)\National Instruments\LabVIEW 2017\project\VI Documentation\_VI2XMLTool\tag_vis_to_document\VIXML Tagging Tools UI.llb\Generate Report.vi)

 

As creating report is marked optional, I ignored it and proceed to generate XML files but I got this error "You have not tagged VIs to take screenshots" & "You have not tagged VIs to Document". I also didn't find XML file to edit and make top level = True.

 

Can you please help me out with this?

Thanks,

Avinash.

maschl
Member
Member
on

Hello @rdr,

 

I also encountered some issues on LabVIEW 2017 SP1. When I tagged the files and then want to create XMLs I receive two error Messages:

Errors.png

 

Nevertheless there are some files created. When I now try to start the second step to transform XMLs to HTML I receive a fatal error:Error.pngWhat might be the problem? Is the tool still working?

 

I also tried HELPer, but that tool seems to crash on my system and some documentation links are broken.

 

 

Thanks,

 

Mario

 

Contributors