cancelar
Mostrando resultados para 
Pesquisar então 
Você quer dizer: 

dynamically obtain a specific class wire type

Hi,
I'm writing a test program that will use different sets of instruments. Using the new OO features of LV, I'm trying to write a program that loads a specific set of instruments from a config file. All the different instruments inherit from one parent device class. When loading the set, I want each object to use its specific initialize methods so I can't simply wire the parent class constant to the initialize methods. I thought the config file could have the class file path and name (from the library property node)  and this could be used to start "a new wire" of the specific class type. Could this be done?
 
Thanks,
0 Kudos
Mensagem 1 de 7
4.245Exibições
If you're using LV 8.5, them there's an easy built-in function to do this called Get LV Class Default Value in the Class, Cluster and Variant palette. Use as shown below.




Message Edited by Jarrod S. on 12-25-2007 06:45 PM
Jarrod S.
National Instruments
0 Kudos
Mensagem 2 de 7
4.221Exibições
Anything in LV 8.2?
0 Kudos
Mensagem 3 de 7
4.214Exibições

Yes, there is a way to do this in 8.2. It requires a little more work (but not much). Refer to the section of this document called The Design of a LabVIEW Class for more info. This document is also an interesting reader for many other facts about LVOOP. I'll also link to the pic itself:

 
Jarrod S.
National Instruments
0 Kudos
Mensagem 4 de 7
4.200Exibições

I have tried your suggestion- there is a wire conflict- the specific class wire is not compatible with the parent class indicator (see attached)



Message Edited by ysegev on 12-30-2007 06:29 AM
0 Kudos
Mensagem 5 de 7
4.162Exibições
I have tried this out but there  is a wire conflict- the specific class wire conflicts with the parent indicator
0 Kudos
Mensagem 6 de 7
4.160Exibições
Sorry, I got  the wires wrong- it works ok. Doesn't it make more sense if the target is the more specific class?
 
Thanks a lot.
0 Kudos
Mensagem 7 de 7
4.154Exibições