LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW VI Scripting fo Code using Existing Class Modules

Solved!
Go to solution

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...

0 Kudos
Message 1 of 5
(1,020 Views)

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)

0 Kudos
Message 2 of 5
(1,010 Views)

@rkbkgk 

 

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.

Product Manager
Customer Learning, Community, Online Documentation, and Support
0 Kudos
Message 3 of 5
(977 Views)
Solution
Accepted by topic author rkbkgk

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:

raphschru_1-1719410694267.png

 

 

2. Replace existing class elements:

 

Template:

raphschru_4-1719412124286.png

Script:

raphschru_3-1719411954189.png

 

Find attached the example VIs.

 

Regards,

Raphaël.

Message 4 of 5
(966 Views)

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:

Kyle97330_0-1719417706469.png

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.

Kyle97330_1-1719417836191.png

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.

Message 5 of 5
(943 Views)