07-28-2008 11:05 AM
07-30-2008 11:19 AM
07-30-2008 11:42 AM
Bob,
Thank you for replying. I have been tasked with writing an extension to our version control scripts that will go through a large project (dozens of libraries, potentially more than one LabView project), identify libraries or LabView projects that have changed, then go through each vi in the changed library or project and diff it to see if it really changed, then try to merge it if it has changed. If the merge is successful we are happy, if it is not then the developer will be told to manually merge the changes because the merge is non-trivial.
It is not enough for us to simply say that a particular library or project changed. We need to know the vis that are different, and we need this to be fully automated, because there are hundreds of vis in one large project.
The test library I used is in ClearCase, visible as a file in a path on a drive letter. I am able to open that library in LabView, although I get three warnings that say that dependent vis were gotten from different paths than originally saved. Once the library is visible as the folder with vis inside, I am able to open each vi in the library, no broken links.
All I tried to do with vbscript was the exact same thing I tried to do with the application on the same computer from a command prompt: Open a vi in a library. The vbscript does not get past the line
Set llb=lvapp.OpenLibrary(llbName)
in other words, the vi server can get an instance of LabView (lvapp) but cannot use this reference to get an object reference to the library.
07-31-2008 10:16 PM
08-01-2008 07:38 AM
Hi Bob,
Wow, you are up late. While I appreciate Kalin's willingness to help, I had these examples and the vi server help file. I have LV 8.5.1 professional installed, and I am using vbscript to automate it via the ActiveX interface.
I'd like to gently point out that the real problem here is the lack of thorough documentation and good error messages. The code snippet I tried is absolutely trivial, anyone can see from the LabVIEW help file that the openLibrary command must be used to access a library. I got an instance of the engine successfully, but then when I tried to get a reference to a library the thing just blew up with a memory or data structure corrupt error. This is the equivalent of a traditional program core dumping on print "Hello World!\n" .
I realize that good error messages may never happen, since this is a mature product. However, if I cannot get my hands on a definitive programmer's guide where I can get past the trivial problems without help, I will be forced to conclude that automating LabView works well in the simple case of running and pushing buttons on a simple vi but it cannot be used to automate the development environment, despite the claims of NI and the documentation that clearly states this is possible.
A clear, definitive answer by the end of next week would be appreciated. If the answer is that indeed the development environment cannot be automated, I will explore using LabView itself to do what I want, put a simple vi on that as an interface and automate the simple vi. We know that works.
Examples of using LabView to navigate projects and libraries would be very helpful if I end up having to use LabView to do that.
Best regards,
Bill
08-01-2008 08:24 AM
Hello Bill,
Thank you very much for getting back to me. I just wanted to clarify a
few things so that we make sure that we are both on the same page here.
It sounds like you are trying to set up an ActiveX Server using LabVIEW,
similar to the examples we gave you, in order to utilize your VBScript
code. Is that correct or are we using it the other way around and having
LabVIEW act more like an ActiveX client?
I am also curious if there is a specific reason why we are using the Command Prompt
for this code. Can you give a more detailed description of how you are
trying to implement this solution? Any extra information at this point
will help us make sure that we are getting the best answer for you. If it
is at all possible to attach any of your code as well that would also
help. Thank you very much for your patience on this issue. I will
work with some other engineers here to get you a more definitive answer for you
during the week next week.
08-01-2008 08:56 AM
In summary, the ability to merge individual vis is a non-starter when NI itself strongly recommends projects and libraries for organizing projects. To put it in simple terms, it is like me telling you I have this fantastic tool for merging text files, but the entire body of source code must be stored in zip files. So, if you want to use my tool, you must manually open the zip file, extract the text file, then work with it and re-zip it when done. You would not be happy.
Best regards,
Bill
08-01-2008 10:10 AM
08-01-2008 04:50 PM