How To Create a Class Of Class Members With LabVIEW VI Scripting?

Updated Aug 12, 2024

Reported In

Software

  • LabVIEW

Issue Details

I have some meta information from which I intend to generate LabVIEW class stubs such that I only need to fill out the block diagram body with actual calls to an external library. So I need a way to generate an LVLib containing several classes, including a bunch of getter and setter for properties and some static/dynamic call VIs.

I know the VI's that handle this in the LabVIEW UI are located in \resource\Framework\Providers but I cannot get them running. I tried to create a new LVLib and put an empty class into it but with no success. When it tries to save the class it fails with a bad argument.

This is what my current attempt looks like:

enter image description here

Are there any examples available which would help me get this started?

Solution

You need to have the .lvclass extension on the name you pass in. Change "foo" to "foo.lvclass".

The providers are probably the best examples but you could also look at something like gRPC Support for LabVIEW  , which generates classes.