LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Determine LVOOP class name? - of a child class...

Solved!
Go to solution

Hi,

 

I have a number of modules (classes) that inherit from a base class called "Module".  I have these all in an array of type "Module", I would like to log some information from each of these modules, but I need to distinguish between each module.

 

Is there a way to determine the class name from the data wire?

 

I can use varient to flattened string, but I was just wondering if there was a built in property node/function for this?


Thanks,
Jonathan

 

Examples Attached:

 Use Module

Get Module Name

Results 

 

Message Edited by malkier on 03-20-2009 12:39 PM
-----
LV 8.2/8.5/8.6 - WinXP
Download All
0 Kudos
Message 1 of 5
(3,641 Views)
Solution
Accepted by topic author malkier

malkier,

 

There is no build in function that does exactly what you are looking for, but you can use the 'Get LV Class Path' VI to return the *.lvclass path of a given object.  Using this path, you can either parse out the name, or you can use VI server to get the name of the class, as shown in the attached image.

 

 Chris M

Message 2 of 5
(3,624 Views)

Excellent! Thanks, thats just what I needed! - Just added a close reference, and Its all good!

 

~Jonathan 

-----
LV 8.2/8.5/8.6 - WinXP
0 Kudos
Message 3 of 5
(3,618 Views)
Oh yea, and I searched for "Get LV Class Path.vi" In 8.5 but it doesn't show up.  I am using 8.6 now on my laptop and it showed up there, not sure if this is available in 8.5(in another location?), or if it is a new feature for 8.6....
-----
LV 8.2/8.5/8.6 - WinXP
0 Kudos
Message 4 of 5
(3,617 Views)
Found it in 8.5 ->"vi.lib\Utility\LVClass\Get LV Class Path.vi"
-----
LV 8.2/8.5/8.6 - WinXP
0 Kudos
Message 5 of 5
(3,615 Views)