LabVIEW APIs Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Can scripting return the names of property and method nodes

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.

0 Kudos
Message 1 of 5
(3,724 Views)

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

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 5
(2,917 Views)

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.

0 Kudos
Message 3 of 5
(2,917 Views)

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.'

traverse question.TIF

thanx alot for your help

0 Kudos
Message 4 of 5
(2,917 Views)

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.

0 Kudos
Message 5 of 5
(2,917 Views)