LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

is it possible to create a dynamic dispatch VI from parent VI as a template

Hi all,

 

I'm new to LVOOP and wondering if it's possible to create a dynamic dispatch VI from the parent VI as a template.

 

For example:

I've got a Class-method in the parent class. All child-classes use this method except of one child, which needs a little tweak on this VI.

So I need to overload the VI in the child class.

When I choose "New -> New Dynamic Dispatch VI" I get an VI based on a template

(As described by Darren Nattinger here: http://forums.ni.com/t5/LabVIEW/Darren-s-Weekly-Nugget-07-07-2010/m-p/1172483/highlight/true#M510414 )

 

Is it possible to get a copy of the parent VI instead that I can tweak ?

 

Thanks you in advance!

 

Best regards,

 

Balze

0 Kudos
Message 1 of 12
(4,017 Views)

Balze,

 

if you create a vi for dynamic dispatch in your parent class, you can select New>>VI for Override. This template calls the dynamic dispatch VI from the parent class. So if you simply want to add functionality (imho classic usage for overloading), this is the way to go.

 

hope this helps,

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 12
(4,016 Views)

Thanks Norbert,

 

I found this way to create dynamic dispatch VIs before.

But that only generates a wrapper around the parents VI.

 

As you mentioned: To add something before or afterwards the execution of the parent VI that's the way to go.

But that doesn't help me with my problem to tweak the parent VI.

 

Thanks anyway !!

 

Best regards,

 

Balze

0 Kudos
Message 3 of 12
(4,013 Views)

There's no way to do it that I know, but I would love one, maybe put up a product suggestion?

 

0 Kudos
Message 4 of 12
(3,989 Views)

I would just do a "Save As" on the parent, then move it to the child class and rename as the same as the parent.

 

Of course it also easy enough to just drag the parent code into the child and mod as required.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 5 of 12
(3,985 Views)

will doing a save-as create it as an override vi?  I had problems with that before... (I thought)

0 Kudos
Message 6 of 12
(3,982 Views)

Hello,

 

@ Briota: Let's see if even more users would like to have this feature and then put up a product suggestion.

 

@ Ben: I tried the "save as" method several times and again and again ran into problems.

Could you please explain your "way" more detailed that i can follow it exactly ?

 

The drag code int new created dynamic dispatch VI is the way I currently use.You're right, it's easy enough.

I just thougt I missed something because this way to create child methods seems so obvious for me.

 

Thanks.

 

Best regards

 

Balze

0 Kudos
Message 7 of 12
(3,980 Views)

An over-ride VI is not that special.

 

The input and output classe must be "Dynamic".

The icon connectors have to be the same.

The Over-ride VI must have the same name as the parent and be a member of the child class.

 

So Save-as add to project but not to class.

 

Move to child class.

 

Rename.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 12
(3,976 Views)

@Ben wrote:

So Save-as add to project but not to class.

 

Move to child class.

 

Rename.

 



And then manually change In and Out Terminal to Child Class, right?

 

Thanks

 

Best regards,

 

Balze

Message 9 of 12
(3,965 Views)

Pointing out my mistakes always earns Kudoes!

 

Good catch.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 10 of 12
(3,963 Views)