LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically Relink Invoke Node while in Executable

Hello,

 

I am using Report Generation Toolkit generating Excel files. I run Office365 on my PC but some computers have slightly different Excel builds and this causes errors(Not allowed to change Excel builds). In my specific case, the "ExportAsFixedFormat" property requires me to "Relink Invoke Node" per computer and rebuild the exe.

 

Is there a way to "Relink Invoke Node" can be done while in an executable. I found that there's a new fancy feature in LV18 "Type Specialization Structure" but doesn't seem to work in an exe. It does speed up my process but not perfect, still have to re-compile on the machine.

 

Has anyone found a solution to trying to do this? I may be doing it completely wrong.

 

Thanks in advance,

Message 1 of 5
(2,986 Views)

The below is in .NET, I am sure the properties also exist for ActiveX.

 

Can you query your version/build and then decide what node to use? I have no idea if this will work.

 

mcduff

 

snip.png

0 Kudos
Message 2 of 5
(2,980 Views)

Hi Mcduff, 

 

So one issue with this is I cant use a regular case statement because one of the invoke node calls is broken on my PC but not the other PCs.

 

Thinking about this more, what I am trying to do might not be possible because it probably requires every version of Excel installed on my PC. Might just have to create multiple VMs and be stuck with what I have.

 

Thanks,

0 Kudos
Message 3 of 5
(2,921 Views)

Hi eyang,

 

one issue with this is I cant use a regular case statement because one of the invoke node calls is broken on my PC but not the other PCs.

You can overcome this by:

- create code for each version of Excel

- create a check, which version of Excel is available

- load the VI suitable for the installed Excel version using VIServer functions and run it…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 5
(2,917 Views)

Can you make the subVI that calls the invoke node dynamically using VI server. You can call a VI from an exe. Have a VI for each Excel version.

 

mcduff

 

EDIT: GerdW beat me to the post.

0 Kudos
Message 5 of 5
(2,915 Views)