LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

question about empty template in MS word toolkit generation

Hello experts, i have a very simple vi, in which I am creating a 2x2 table in a column format using 'empty' template.

I have taken this vi from the example vi that came with labview (Ex. vi name: Column Graph.vi).

 

Though i want to create a 2x2 data in column, i see the output word file created has 4 columns named 3rd quarter and 4th quarter.

I am not sure where these columns are arising from. Can anyone please suggest me what is going on? Attached is vi and the report generated

 

Now on LabVIEW 10.0 on Win7
Download All
0 Kudos
Message 1 of 19
(3,503 Views)

it is unclear if this is a Bug or a Feature (because you specified an Excel Column format).  If you input an empty array, you'll find this graph (tested with LabVIEW 2016, so it's at least "consistent" ...):

Word Graph.png

What I think is happening is that in the implementation of this Feature, there's a "placeholder graph" (shown above) that gets overwritten when you have at least four points.  Another "clue" or symptom is the type of graph -- you chose Excel Column, which names the columns (1 and 2, and defaults to the four quarters).  If you choose an XY scatter plot, then you can plot two entries, and the first row will be actual X coordinates (so they won't necessarily be evenly spaced columns).

 

Bob Schor

0 Kudos
Message 2 of 19
(3,472 Views)

This is what I get when I run the code.  Office 2010

Capture.PNG

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 19
(3,471 Views)

Cant explain that one.  Code looks correct and works for me.  Only advise i can offer is to dig into the sub vi's and see if you can find something.



-Matt
0 Kudos
Message 4 of 19
(3,468 Views)

I should have noted that I ran my test on a Windows 10 x64 system, Office 2013 (64-bit), LabVIEW 2016 (32-bit).  I'll be "out" tomorrow, but if there's no resolution, I'll try on Wednesday to test on a Windows 7 x64, Office 2010, LabVIEW 2012/2014/2016 system.  I think I also have a LabVIEW 2011 VM (but I may have discarded it ...).

 

Bob Schor 

0 Kudos
Message 5 of 19
(3,457 Views)

Thanks everyone for their help.

@aputman, i have word 2013. not sure if that is the cause of this issue.

@matt198717, I went and looked into the sub vi, but nothing specifically came up, so not sure where to look for,

@ Bob_Schor, i totally agree with your philosophy of "What I think is happening is that in the implementation of this Feature, there's a "placeholder graph" (shown above) that gets overwritten when you have at least four points", i am trying to determine where this placeholder graph is hidden.

 

I am absolutely clueless now what to do moving forward, this VI is very crucial for me to get going as I had promised my team that I would be able to get the report generation part going based on the example codes.

Now on LabVIEW 10.0 on Win7
0 Kudos
Message 6 of 19
(3,441 Views)

Look at the solution in this thread.  I posted a crude example of how to insert an Excel chart rather than those ugly OLE objects that get embedded when using the RGT.  I don't know for sure how it might work in Word due to the fact that Word opens up an Excel file to store the dataset but it's probably not too hard to figure out using macros.

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 7 of 19
(3,436 Views)

Turns out, after doing a small amount of research, it is possible to add a chart to a Word document (using the code below) but the method for editing the dataset (in an Excel worksheet) is not available.  Are you required to use Word?  If not, I suggest to use Excel and the method above.  If Word is required, you can use the Excel method above, save a picture of the chart and load that into your Word document.  

 

Example_VI_BD.png

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 8 of 19
(3,428 Views)

Ok i will look at it. i was doing some more debugging, and created a report from my observation to help NI understand better what the issue is. hopefully, it helps.

 

Moreover, i noticed that if :-

  • I insert a breakpoint during the graphing rountine,
  • Click on the chart in word report
  • Re-run the vi after breakpoint
  • Open the word report

I get the result what i want, i.e. only 2 graphs. However, if i run the code without breakpoints, I see the incorrect result that I had shared earlier...

 

something is definitely goofy here

 

Now on LabVIEW 10.0 on Win7
0 Kudos
Message 9 of 19
(3,426 Views)

@Bob_Schor wrote:

I should have noted that I ran my test on a Windows 10 x64 system, Office 2013 (64-bit), LabVIEW 2016 (32-bit).  I'll be "out" tomorrow, but if there's no resolution, I'll try on Wednesday to test on a Windows 7 x64, Office 2010, LabVIEW 2012/2014/2016 system.  I think I also have a LabVIEW 2011 VM (but I may have discarded it ...).

 

Bob Schor 


I tried LV2012, 2014 and 2015 with Office 2010 and the result is as expected (only 2 columns). Using Windows 7 pro

 

Ben64

0 Kudos
Message 10 of 19
(3,424 Views)