LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Strict type => DD method for every class

Solved!
Go to solution

I have DD method ConstSetup for setting some constant part of object. Object has some other objects inserted into (cluster Objs). I call DD method ConstSetup for all inserted objects too.

However I have to declare DD method ConstSetup for every class because some part of method (cluster Objs and cluster Const) is strictly typed (see image). Is any way to avoid this strict typing to allow only one ConstSetup method in parent root class ?


*** LV2018 ***
0 Kudos
Message 1 of 4
(2,129 Views)

I'm unsure what your included image is referring to, or why you are doing things that way in your code. Why write to a control and then read out via property node? It's unclear what exactly you are doing here.

 

Typically, if you have no changes in code (except for the values within already existing class data fields) then you do not need to implement a DD VI for each child. They will automatically use the parent version.

 

If you can show what changes between parent and child, then maybe we can help further.... Your code certainly seems to be overly complicated.

0 Kudos
Message 2 of 4
(2,111 Views)

I've simplified example. I have a DD method ConstSetup. Method VI is configured to open FP when called.
So I call this method on some object and FP opens, I edit Const cluster and press SET. Changed Const is written to object body and FP closes.

 

And my question. I should have this DD method for every object class with different Const cluster, right ? Or is any way to have only one DD method in parent?

Is it clear now what I'm asking ?


*** LV2018 ***
0 Kudos
Message 3 of 4
(2,100 Views)
Solution
Accepted by topic author petrnowak

You will need a VI per datatype of "Const". So if you have 15 different "Const" Datatypes, you will need 15 different versions of this VI with the correct datatypes on the FP.

 

Thanks for the revised image, makes things a lot clearer.

0 Kudos
Message 4 of 4
(2,097 Views)