From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can you create override VIs for Report Generation Toolkit?

We are using the Report Generation Toolkit in LabVIEW 2015 to write Excel test result files.  The toolkit is very useful, but has a few problematic settings.  One is that the toolkit does not provide a way to open a new instance of Excel when writing files.  So if the user has a separate file open in regular Excel and is editing a cell when the Report Gen toolkit VIs try to write to a file, the toolkit write will fail.  This would not occur if we could specify opening a separate instance of Excel when calling New Report.vi.

 

When the Report Gen toolkit is using the NI_Excel.lvclass, it'd be great if we could set the Automation Open primitive's "open new instance" input to True.  Is there a way?

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

Have you tried wiring in a control, setting its default to false, and adding it to the connector pane?

 

Then, you don't need an override.  The VI will have that input exposed with a default value of false.  If you wire in the true, it'll take the true.

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

One way might be to make Excel always open in a new instance.

 

See this link:

https://support.microsoft.com/en-us/kb/3165211

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

Thank you much for your responses Per and natasftw!  Those are both good ideas.

 

A little more background on our application - We have a large LabVIEW/TestStand application that will run on seven ATEs with Windows 10 64-bit.  These ATEs are used for production testing of aerospace components, so our ATE SW configuration is tightly managed and controlled (released SW, full documention of PC configuration, etc.).  Our ATEs run on a corporate network and our IT dept is only allowing Office 2010 right now.

 

Configuring Excel isn't an option for us for several reasons:

  1. Per the Microsoft KB, configuring Excel to always open a new instance is only supported on Office 2013 and later.
  2. Due to having many tightly controlled ATEs, we'd really like to avoid manually editting the registry on each ATE PC.

I was going to edit "new report subVI.vi" in the toolkit's NI_Excel.lvclass , but that VI was locked.  Kinda strange cuz many other VIs in the class aren't locked.  Turns out "new report subVI.vi" is locked without a password (see attached), so I can unlock it and modify it as natasftw suggested.  There are a few drawbacks with this.

  1. To implement this as a user settable control, the control would have to be added to the VIs that are ahead of "new report subVI.vi" in the call chain, including some callers that are in the separate NI_report.lvclass.  So likely I'll just edit "new report subVI.vi" to wire a constant True to the "open new instance" input of Automation Open.
  2. I'll have to see if there are other VIs we're using in the Report Gen toolkit that use Automation Open.  If so, I'll need to modify those as well.
  3. Whatever modifications we make will need to be repeated or copied onto each production ATE and each SW development PC.
  4. When we update to a new LabVIEW version, we'll need to repeat the modifications or copy them onto each production ATE and each SW development PC.

It'd be really cool if we could somehow implement the modification in our application source code directory tree.  That way any PC that gets the latest SW version from our SVN source code control repository would have the mod automagically regardless of LabVIEW version.  Guessing that may not be possible but I'm still hoping!

 

It would be even cooler if NI would modify the Report Gen class to add a control that allows any user to specify that Excel (or Word if it is being used) be opened in a new instance.

 

Hans

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

You could write a quick script that will replace the default VI with your own.  But, that may not be desirable behavior for all applications as you're making it always true.

 

You could post on the LabVIEW Idea Exchange asking for that feature request.  That's usually the best way to get it added.

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