LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

excel chart scale

I cannot get LabView to set the maximum scale for my chart. Any idea? Thanks
0 Kudos
Message 1 of 6
(3,206 Views)
Do you get any errors?
Some of your property and invoke nodes are not wired, so first make sure you are tracking all the errors. This may give you a clue why the scale is not set.
When I run your VI ( I had to replace your SubVI with Open New Worksheet.vi) I get this activex error -2147352573 from the Axis.MaximumScale property. I saw this error with the report generation VIs, and the following link has the fix:
Error "-2147352573 Member not found in the xxx.vi" with NI Reports VIs in LabVIEW 6.0
This may not be a solution to your problem. In your VI, you are trying to get a reference to Axis object from Chart.Axes output. This will
not work. You should first use Excel.Axes reference wired to Variant to Data function. Then wire the output reference to Axes method Item. Wire xlCategory or xlSeriesAxis to the Type input. Then wire the Item output reference to your Variant to Data that has Excel.Axis reference wired to it.
I've attached modified VI that first uses Axes method to get the reference to Axis.
Zvezdana S.
Message 2 of 6
(3,206 Views)
There is one step that you have left out. Excel will ignore the MaximumScale value unless you set the MaximumScaleIsAuto to False.

Michael Munroe
www.abcdefirm.com
Michael Munroe, CLD, CTD, MCP
Automate 1M+ VI Search, Sort and Edit operations with Property Inspector 5.1, now with a new Interactive Window Manager!
Now supports full project automation using one-click custom macros or CLI.
0 Kudos
Message 3 of 6
(3,206 Views)
Hi, thanks for such a good answer, my scale is now working. But you also said that some of my VI property and invoke nodes are not wires, and I have looked back at my code, but I did not see anything unwired. Are you talking about how I did not close reference on any of the nodes?
0 Kudos
Message 4 of 6
(3,206 Views)
Sorry for not explaining this better. Yes, you did not close some of the references. But what I meant is not wired are the errors on the property and invoke node. That is why you didn't catch the error before. Just make sure you wire all the property and invoke nodes together both to check for errors and to ensure the data flow.
Zvezdana S.
0 Kudos
Message 5 of 6
(3,206 Views)
Thanks 😛
0 Kudos
Message 6 of 6
(3,206 Views)