06-26-2024 06:25 AM
Good Day...!!!
This Question is kind of an advanced VI Scripting Question.
I need to Script a VI that uses an existing LabVIEW Class and its VIs to do some operation.
I can not find a clear example for this... if you have a good example or a suggestion that will be great...
Solved! Go to Solution.
06-26-2024 06:39 AM
I appreciate the immediate response...
I tried to search for invoke node option to initialize the class instance. I can not able to find one. do we need to give path of the existing class? or reference of the class from project ? how we will get the invoke node in initialize the class instance(object)
06-26-2024 08:55 AM
The post you responded to here ended up being spam so it's probably why the advice was off. Sorry about that, the user was removed. Hopefully someone else in the community will have a better answer.
06-26-2024 09:31 AM
Hi,
@rkbkgk wrote:I need to Script a VI that uses an existing LabVIEW Class and its VIs to do some operation.
The description you give is insufficient to give you precise help.
Some general techniques:
1. Create class elements from scratch:
2. Replace existing class elements:
Template:
Script:
Find attached the example VIs.
Regards,
Raphaël.
06-26-2024 11:05 AM
Raphschru's example is good if you're trying to make a script that creates/modifies a VI that runs a class operation of some sort, but it sounds more like maybe you're trying to access an existing class to run one of its VIs, is that correct?
If you're trying to manipulate a class to examine its members, add new ones, check or change its properties, and so on, then you would start by loading it with an Application invoke node under the "LVclass" section:
If you want to get the information on a class on a wire, or if you want to load a class dynamically and put it on a wire, then there are 4 VIs in the "Cluster, Class & Variant" palette for you.
To get any more specific I think we need a better description of your end goal. It's pretty hard to be sure what you truly want the way it's phrased now.