12-09-2023 12:45 AM
How do we get the data type of an LV class.
Is it Get LV default value, Open VI reference or something else?
12-09-2023 07:05 AM
Hi Fresenius,
What do you mean exactly by the "data type of an LV class" ?
If you mean:
- the class name, then use VI "Get LV Class Name.vi" from the "Cluster, Class and Variant" function palette.
- the class path, then use VI "Get LV Class Path.vi" from the same palette.
- the class private data, then you can't unless you add accessors to your class to expose the data publically.
Otherwise you need to be more specific about your needs.
Regards,
Raphaël.
12-09-2023 06:30 PM
Thanks Raphaël,
I do believe that I need a little more info here.
But this was a question in the CLA-R exam which I attempted a number of times now but I just couldnt get my head wrap around this question.
I haven't used LabVIEW OOP extensively but I don't seem to understand their question here. They need to get data type of a LV class and the options were Get LV default value, Get LV path, Open VI reference server and one more option which I dont seem to remember.
Any thoughts on this now?
12-09-2023 07:14 PM
Well, then I guess "Get LV Class Default Value", since the value implicitly contains the data type, but this question makes little sense without any context. It depends what you want to do with this "data type".
A data type is something abstract that can have many forms. It can be a variant, a type string, the path to the file that defines the type, a textual description of the type, even the color of the wire could be interpreted as the data type…
Regards,
Raphaël.
12-09-2023 07:23 PM
Thanks Raphael,
Then I believe, I will chose that if I encounter the question again.