LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XML Load Document in EXE does not run

LV 8.0 (or 8.01).
 
This has got to be a trivial installation problem. I wrote a simple VI that reads in an XML file using the XML Load Document vi. It runs like a charm. I then built an exe. Loading the exe results in the following set of errors:
 
Unable to Locate Component
This application has failed to start because xerces-c_2_2_0.dll was not found. Re-installing the application may fix this problem.
 
This is then followed by:
LabVIEW: Resource File not found
The file 'DOMUserDefRef.dll' is not a valid LabVIEW file
 
As it turns out, I just received my 8.01 CDs, so why not? I installed the upgrade, repaired the internet toolkit, sprinkled some distilled water on my keyboard, but the problem did not go away. I then un-installed ALL of LabView, re-installed 8.00, did the hokey pokey, problem is still there.
 
Am I missing some vital step? If so, I would love to find out where this is documented.
 
I've reduced the problem to just having the XML Load Document vi connected to the Close Reference VI. See the attached VI.
 
Thanks,
 
fredb.
 
0 Kudos
Message 1 of 6
(2,939 Views)
I have tried to reproduce this issue, but I cannot access the "XML Load Document" or "Close Reference" VIs because they are not standard LabVIEW 8.0 VIs.
 
I have successfully written and loaded in an XML file using the "Write to XML File" and "Read from XML File" VIs included in LabVIEW 8.0. These continued to work after I built an exe.
 
Please let me know if this helps. If it is an option to try the standard LabVIEW 8.0 VIs for your application then you may wish to try that. I'm not sure if the other two VIs that I couldn't access were based off of the included LabVIEW VIs or not.
 
If this doesn't answer your question, perhaps you could post the "XML Load Document" and "Close Reference" VIs and I will try to look at them in further detail.
 
Casey Weltzin
National Instruments
0 Kudos
Message 2 of 6
(2,923 Views)

Hi Casey;

The XML Load Document is part of the XML ToolKit - that comes with the Internet Toolkit from NI. I'm not sure how I can post NI's toolkits here. They are available in the Toolkit CD (part of the Professional Suite). (I tried to get a screen shot in here - can't even do that!).

I'll attach a sample XML Doc I've created. It is created by parsing the LVPROJ file in order to find all the dynamic VI's. I'll build one based on a very simple demo project and attach it here. I was able to parse most of it by using the get tag method, but when I went to use the get value - that would always return a blank string - so I gave up, found an example using the internet toolkit - and off I went.

I do have a workaround (not too elegant) - I create a simple text file each time I write the XML file. I then read the txt file from within the EXE.

Thanks for looking into this. I did get a pointer from my excellent field engineer (Lesley Yu) who suggested I take a look at...

http://digital.ni.com/public.nsf/websearch/694A29DC644542BC86256E29007CCAC1?OpenDocument

This recommends I explicitly register the dll. I have not had a chance to try this. I did completely uninstall LV and re-install it. That wasn't it.

Thanks again,

fredb.

0 Kudos
Message 3 of 6
(2,914 Views)
I think I may have found something that can help. Try going to the help menu in LabVIEW and searching for "dom". The second search result is a help file named "Building Stand-Alone Applications with Internet Toolkit VIs." If you haven't previously read this, it sounds like there are a few extra steps to take when building an exe using the internet toolkit.
 
I hope this helps.
 
Casey Weltzin
National Instruments
Message 4 of 6
(2,902 Views)

Casey!

I found your pointer to the build documentation. I think it is very easily translated to LV 8 - just a small matter of adding those files to the list of dynamic VI's and support files. I have not had a chance to try it, but am convinced that it will help, as the instructions specifically call for the dll's that the run time engine is complaigning about. I will try this, hopefully tonight - and will post again with a 'success' message.

Thanks for your help,

fredb.

 

0 Kudos
Message 5 of 6
(2,886 Views)

Hi Casey;

Your recommendation was spot on. The only problem is that Help has not been updated for LV8 in this area. So, it has taken some amount of trial and error to figure out how to perform the equivalent steps using the LVPROJ build settings.

Although I don't have my application totally happy - I'm pretty sure it is caused by pilot error. I believe the original problem I had is resolved.

For those of you reading this, in case you too are not an lvproj build expert, here is what you are going to have to do (this after you read the second item after searching for help on DOM as recommended by Casey)

1. Add the 4 files (rc, rch, and the two dlls to your project.

2. Open up the properties page of your build.

3. Move the 4 files from your project to the build and support files pane (in the source files tab).

4. Define two new destinations (resource and dom - specifying the corresponding paths) - (in the destinations tab)

5. Go to the Source File Settings tab, select each of the four files, and specify the destination for each.

6. Save everything, then build. Best of luck.

0 Kudos
Message 6 of 6
(2,878 Views)