LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Access ActiveX collections within LabVIEW which have no Count property and no Item method

Hello,
now I decided to start a new thread after I appended an old thread yesterday (from 2001, started from David Boyd).
Because the issues are very the same I have a copy of the old thread included here. The then posted answer where not satisfying at all.
 
David Boyd wrote, 09-28-2001
Titeled: OLE Automation of Visual SourceSafe 6 from LV6.0.2, properties/methods missing?
 
Hello all,

I'm trying to use Visual SourceSafe as an automation server from within LabVIEW 6 (I know, I have the PDS, I'm trying to improve on the existing SCC tools available). For some reason, the IVSSVersions reference comes up in LabVIEW as having NO properties and NO methods. As a collection object, it should have a 'count' property and an 'item' method so I can loop to get individual IVSSVersion references. Other collection objects within VSS automation work OK, as do other automation interfaces I've used within LV in the past. Can anybody who has a copy of VSS (ver 5 or 6) try this and see if it's just me? I suspect it's a MS bug in how VSS OLE reports its objects, properties,
and methods to LV, but I'm unsure.
I've also posted this to a couple of Microsoft newsgroups related to VSS.

Thanks,
Dave

David Boyd
Sr. Test Engineer
Respironics

 

A Rafiq answered, 09-29-2001:

Just a tip, when i encounter such a problem i use visual basic as a great tool to verify the object model. In VB add the project reference and using object browser make sure if you can see the collection prop and methods in Visual Basic.

my 2c

A Rafiq

 

I've added; 07-20-2001:

Hello,

I know this is a realy "old" thread I'm responding on and I hope someone is still listening. I have exactly the same problem David had that time but I know already, that it's neither a LabVIEW nor a VSS bug. The problem is that the VSSVersions object has no 'Count' property and no 'Item' method implemented. A documentation of the VSS OLE Automation says that the only way to use this collection is to call the '_NewEnum' method in C++ or use a 'for-each loop' in Visual Basic!

But how can I do this in LabVIEW!!!!

Please help!

I'm using LabVIEW 7.0 and Visual SourceSafe 6.0d

Klaus

0 Kudos
Message 1 of 9
(3,824 Views)
Someone may have an answer for you here, but if you wish, David Boyd is a member of the LAVA forums. You can try reaching him there and maybe he can help you.

___________________
Try to take over the world!
0 Kudos
Message 2 of 9
(3,818 Views)

The web site http://forums.lavausergroup.org/ can not be found at the moment.

I've considered myself to contact David Boyd direcly, but I don't know how yet.

 

0 Kudos
Message 3 of 9
(3,807 Views)

Klaus,

 

There was no solution I could find to this, and I eventually abandoned the notion of writing my own version control tools for VSS.  The version control support in the PDS release of LabVIEW was greatly improved in, I think, 7.0 (or was it 6.1?... how quickly we forget).  The current level of integration with Visual SourceSafe, I feel, is adequate - you get access to the more common check-in/check-out and visual differencing tasks on an individual VI, directly from the menubar.  This was about what I would have wanted to add if I had been able to complete the ActiveX automation project.

The only things I would wish for now, are probably too VSS-specific to ever be added by NI.  These include:

Differencing between arbitrary versions (more than just the current and most recent version)

Support for project labels, and integration with the application builder

 

If you don't have the PDS, and can afford to get it as an add-on, I would highly recommend it.

 

Best regards,

 

Dave

David Boyd
Sr. Test Engineer
Abbott Labs
(lapsed) Certified LabVIEW Developer
0 Kudos
Message 4 of 9
(3,790 Views)

Hi Dave,

thank you for your comment!

The VSS features in the PDS may not help to solve my problem, because it's not the goal to improve the interaction of VSS and LabVIEW but more to write an independent VSS frontend with abilities neither the PDS-VSS-interface nor the generic VSS frontend supply (replication of two different VSS databases).

The reason why I use LabVIEW for such a task is because I'm best skilled in programming LabVIEW due to the daily work. If it doesn't work with LabVIEW I've to take the effort and do it in Visual C++.

But if it is so, it would be a real "Armutszeugnis" (evidence of incapacity) for LabVIEW, like we say in german.

I know, another option might be to iterate through this ActiveX collection using external code with a DLL. But I don't know if this is less effort.

Maybe sombody has example code on "how to pass/return an activeX refnum to/from a DLL.

regards

Klaus

0 Kudos
Message 5 of 9
(3,785 Views)
I've been trying to do the same thing. I don't have an answer for iteration over the VSSVersions object, but I did find something interesting while surfing around MSDN (Microsoft Developer Network). In SourceSafe 2005 (in beta right now), every VSSItem object has a reference to its VSSVersion parent. You don't need it if you are programming in one of the MS languages, so we must not be the only ones trying to use VSS with another language 🙂

Also, VSS2005 uses the same repository format, so VSS6 and VSS2005 clients can be mixed on the network. I think our plan is to upgrade just a couple licenses, because we only need to run this program once a week. (We are trying to automate VSS and NI's VI Analyzer to find all VIs checking in the past week, run our analyzer tasks on it and print out a report.)
0 Kudos
Message 6 of 9
(3,755 Views)
Is there a select next item method?? I had something similar with an activex control. It didn't give you an array of references. You had to put it inside a loop and shift register , use the first reference to get a value, then select the next item, and feed the reference into the shift register for the next iteration. Maybe the select next item would be an invoke node.

Message Edited by unclebump on 08-15-2005 06:53 AM

0 Kudos
Message 7 of 9
(3,749 Views)
There isn't a Select Next. In fact, once you get a reference to a VSSVersions object, LabVIEW doesn't show any Properties or Methods. It is a dead end, unless you have Visual C++ or Visual Basic. Unfortunately, VSSVersions objects are the only way to access VSSVersion objects (you have to pay attention to the 's' on the end) and the VSSVersion objects contain some useful information (like who checked in that version and when they did it). VSSVersion objects contain a reference to a VSSItem object that contains information about that actually file that is under version control. You can get a reference a VSSItem directly by using it's path, but there is currently no way in LabVIEW to get from the VSSItem to the VSSVersion that contains the checkin information. VSS2005 will correct this (according to beta documentation, I haven't got a copy to verify this).
 
Pat
0 Kudos
Message 8 of 9
(3,737 Views)
We startet to implement our solution in VBA and it seems to work ok.
Nevertheless it is a very good hint to try it with an actual version of the VSS-Client.
Lavezza, maybe you could post al little notice in this thread, when you have made ANY experience with VSS2005 and LabVIEW!?!
0 Kudos
Message 9 of 9
(3,695 Views)