LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Word Insert Graph VI adds its own undesirable data to report. How do I remove it?

The attached vi will create a graph from 3 x 3 data set (we are mapping power supply current vs transmit frequency). However the vi adds a fourth set of data points as detailed in the word document (Called fourth quarter). Where does this VI even create the data? how do I remove it? Why does it even do it?

Download All
0 Kudos
Message 1 of 6
(2,870 Views)

I changed the Graph Type to xlColumnClustered and got this:

TestGraph.png

Bob Schor

0 Kudos
Message 2 of 6
(2,854 Views)

This came up once before.  Check the alternate method that I posted in this thread for creating the built-in charts rather than using the OLE objects.

 

https://forums.ni.com/t5/LabVIEW/question-about-empty-template-in-MS-word-toolkit-generation/m-p/335...

 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 3 of 6
(2,854 Views)

@jefffffff wrote:

The attached vi will create a graph from 3 x 3 data set (we are mapping power supply current vs transmit frequency). However the vi adds a fourth set of data points as detailed in the word document (Called fourth quarter). Where does this VI even create the data? how do I remove it? Why does it even do it?


This data comes from the default template MsGraph uses when an OLE Graph type object is inserted. For my Office installation this templates is called GR8GALRY.GRA. If you open a new Word document, go to Insert -> Object... and scroll to select Microsoft Graph Chart you will see what this default template object looks like (and from where this 4th quarter column comes from). The RGT uses an obscure vi called "set cb" to copy the data to the clipboard and then paste it to the graph object spreadsheet. It seems that in your case the clear range method that is called to erase the template spreadsheet data doesn't have time to clear the data before the paste method is called. Since your data is 3X3 only the first 3 columns are overwritten.

 

Does it systematically happen? Personally I don't have this issue (LV2016, Office 2010, Win7 Enterprise 64-bit).

 

Ben64

0 Kudos
Message 4 of 6
(2,799 Views)

I continue to have the issue under: windows 7 64 bit, office 2013 64 bit , and labview 2014 64 bit. I have a work around in the attached vi where I force the data set to null from the insert graph and then perform a graph update. You will always get at least 4 data sets on the graph even if you have less to display, but the unused sets will be blank and only the data you want will be given. Once your data set is greater than 4 the data will of course be overwritten and the issue is covered up withy your new data set.

0 Kudos
Message 5 of 6
(2,782 Views)

The RGT is made to work with the 32-bit version of LabVIEW, you might experience unexpected behavior with LabVIEW 64-bit, in this case the cells.range.clear method doesn't seems to work. You can try putting a breakpoint between the range.clear and range.paste method to see if its what's going on.

 

Ben64

0 Kudos
Message 6 of 6
(2,757 Views)