09-11-2009 11:26 AM
I have a fairly large program that we have written in LabView. We make a lot of ActiveX calls and need to find a way to generate a list of all the ActiveX calls and the names of the property and method nodes. and if possible a list of the names of all VIs that they live in. Everyone that I have turned to has told me that my best option is LV Scripting.
09-11-2009 12:55 PM
I think those people that gave you that advice were right. Scripting is the answer. Now you just need to sit down and learn about scripting and write that whole thing. From what you describe it would not seem very hard but scripting is some really tedious and time consuming work.
You want to enumerate all VIs in a project and for each of them enumerate all objects in the diagram and then look through those objects to identify ActiveX property Nodes and Methods. There might be a problem that it is not easy to derive the actual ActiveX component used from the class name LabVIEW maintains, but it can give you at least a list of Vis, the classes used and the methods and properties called.
Rolf Kalbermatter
09-11-2009 12:59 PM
Scripting will work well for this.
Basically, traverse your VIs to find property/invoke/constructor nodes. You can use "vi.lib\Utility\traverseref.llb\TRef Traverse for References.vi" to help. You would want to wire "Property", "Method", or "Constructor" (or even "ObjFunction") for the Class Name. This will find all the nodes. For property nodes, you need to look at all the property items. On the Property Item class and the Invoke Node class, there are properties called "Property" and "Method" that will return a string value for the prop/meth selected.
09-11-2009 01:55 PM
ok i got this much accomplished: Basically, traverse your VIs to find property/invoke/constructor nodes. You can use "vi.lib\Utility\traverseref.llb\TRef Traverse for References.vi" to help. You would want to wire "Property", "Method", or "Constructor" (or even "ObjFunction") for the Class Name.
after that your directions are a little fuzzy.
"For property nodes, you need to look at all the property items." not sure what this means.
so i can't get to this: "On the Property Item class and the Invoke Node class, there are properties called "Property" and "Method" that will return a string value for the prop/meth selected.'
thanx alot for your help
09-11-2009 02:00 PM
A single property node can contain multiple properties. Meaning, each row is a different property. On the other hand, a single invoke node can only contain one method. If there are multiple rows in an invoke node, they are parameters or outputs for the one method.
On the "Property" class, there is a property called something like "PropItems[]". It will return an array of references. Each reference is for one of the prop items in that property node. The PropItem class will then have the "Property" property. On the other hand, the Invoke node class has a "Method" property.