06-05-2017 03:12 PM
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?
06-05-2017 03:34 PM
I changed the Graph Type to xlColumnClustered and got this:
Bob Schor
06-05-2017 03:35 PM
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.
06-06-2017 12:05 PM
@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
06-08-2017 11:21 AM
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.
06-09-2017 07:04 AM
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