VI Analyzer Enthusiasts Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Custom test working with path input (debug) but not with VI Ref (VIA)

Hello VIA enthustiasts,

I need to remove almost all case structures quickly from a large project. First idea that comes in mind is to write a small VIA test that uses the code of the right-click plugin Remove and Rewire Objects. Everything works fine in debug mode, but when I run the test with VIA on my project nothing happens! No error, but no case structure removed.

 

Any idea ?

 

Thanks,

 

Olivier


Olivier Jourdan

Wovalab founder | DQMH Consortium board member | LinkedIn |

Stop writing your LabVIEW code documentation, use Antidoc!
0 Kudos
Message 1 of 5
(2,945 Views)

I'm guessing it has something to do with undo transactions. Are you calling the following core scripting VI? 

 

vi.lib\Utility\QuickDropSupport\Remove and Rewire Objects_core.vi

 

That's the VI you should call, calling anything higher level than that may result in unexpected behavior.

 

If you're still having issues, can you post the problematic test LLB so I can debug it?

 

 

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

Hi Darren,

Yes that the VI I use.

Here is the llb, thanks in advance for your help.

 

Olivier


Olivier Jourdan

Wovalab founder | DQMH Consortium board member | LinkedIn |

Stop writing your LabVIEW code documentation, use Antidoc!
0 Kudos
Message 3 of 5
(2,923 Views)

I ran your test both in debug mode and with the VI Analyzer and it worked both times, the case structures in my VIs were removed. A couple of things to think about:

 

1. Are any of the files you're analyzing read-only? I would expect the save method to error out in those cases, but I thought I'd ask.

2. I think you should wire the error terminal from the Remove and Rewire subVI to the error out of the test. If that subVI errors out, your save method won't execute. But you also won't see the error either.

3. This shouldn't cause an issue, but I noticed you don't have anything specified in the RD VI for the test. I think you'll be fine with "Other" > "Panel" in there. Here's the page that describes the RD VI "Other" options in detail.

0 Kudos
Message 4 of 5
(2,916 Views)

I made changes you advised in 2. and 3. and test worked. Not sure it's related, but...

For the record, modification of this test seems to mess up the project. Hundreds of warnings like the one below appear at the end of the analysis process. 

 

Warning.png

 

Anyway, I obtained the code I want much quicker than with manual modification.

 

Thanks for your time and your help Darren. 


Olivier Jourdan

Wovalab founder | DQMH Consortium board member | LinkedIn |

Stop writing your LabVIEW code documentation, use Antidoc!
0 Kudos
Message 5 of 5
(2,911 Views)