09-23-2015 11:36 AM
@Gregory wrote:
If I open "Excel Insert Graph.vi" and then open "Excel_Insert_Chart.vi" I see that it checks at the beginning if the window state is "xlMinimized". If it is, then it sets it back to minimized at the end. So, I'm inclined to agree with James that this is expected behavior of using ActiveX to insert an OLEObject.
Yep, after a quick trial here, I am experiencing the same thing. From what I quickly read, these are embedded objects, not the typical Excel graphs used if you insert a graph from the UI.
09-23-2015 12:17 PM
Here is a way to do it without using OLE Objects. I confirmed that this method does not flash up the excel window when inserting the graph and it uses the build in charts (much nicer looking charts). I quickly generated data and hardcoded the range of the data but you could easily create this range programmatically using your data.
09-23-2015 05:21 PM
Thank you very much Aputman. It took me a while to figure out how to add titles and plot non-adjacent columns, but now I am really happy with the result. I went ahead and marked yours as the solution. Here is my revised "Make Graph" VI if anyone is interested:
10-04-2016 09:48 AM
@aputman wrote:Here is a way to do it without using OLE Objects. I confirmed that this method does not flash up the excel window when inserting the graph and it uses the build in charts (much nicer looking charts). I quickly generated data and hardcoded the range of the data but you could easily create this range programmatically using your data.
Can you please post this VI in LV 2011 format?
02-27-2017 01:06 PM
Hi aputman,
I looked at your example below. I was able to create Excel._Chart (thanks for the help). From here, I cannot duplicate what you have below (I see the "Variant to Data" data output is connected to ChartObjects below which you have Add method, which is connected to ChartObject which is the Chart method)
I right-clicked on the "data" output of the Variant to Data -> create -> methods -> ChartObjects which puts a "_Charts" node on the block diagram with CharObjects and Index below that. (see attached pic). I just cannot find the Add method like you have in your post.
02-28-2017 11:29 AM
All the images posted are Snippets and are executable code, no need to re-write what you see.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
02-28-2017 04:02 PM - edited 02-28-2017 04:04 PM
@murchak wrote:
Hi aputman,
I looked at your example below. I was able to create Excel._Chart (thanks for the help). From here, I cannot duplicate what you have below (I see the "Variant to Data" data output is connected to ChartObjects below which you have Add method, which is connected to ChartObject which is the Chart method)
I right-clicked on the "data" output of the Variant to Data -> create -> methods -> ChartObjects which puts a "_Charts" node on the block diagram with CharObjects and Index below that. (see attached pic). I just cannot find the Add method like you have in your post.
Could you turn on the labels for the blocks in your diagram or upload that VI? I was going to try to rebuild your code, but I am not sure what blocks you are using.
02-28-2017 04:11 PM
Those images are snippets. They have the code embedded in the image file. Save the image to your desktop and then drag it onto a block diagram and the code magically appears (assuming you have the RGT installed). No need to re-code it.
You may notice the "LV: 12.0" in the upper left corner of the image. This is the version of Labview used to create the snippet. If your version is the same or newer, the snippet will work for you. If not, a LV11.0 version of this code was posted in this thread.
02-28-2017 04:28 PM - edited 02-28-2017 04:30 PM
Can you take a screenshot of that area? I drug the snippet into LabVIEW, and the option was there for me to do it.
02-28-2017 04:34 PM - edited 02-28-2017 04:36 PM
The fact that you had to google how to make a screen shot means you didn't read the link I provided. Go to your block diagram, press CTRL+A, go to Tools >> Create VI Snippet from selection. This image is now executable code. Taking a screenshot of your whole computer and showing potentially private information probably isn't what you want (like knowing you use lotus notes).
It looks like you were able to open the snippet, and it looks like you have the Add method, for the Chart Object, what seems to be the problem?
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord