LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I set the marker size in excel?

I'm using the excel report driver to generate scatter plots with CVI. The markers are appearing with a default size of 5, but I want to be able to set it to 2 with code. I haven't been able to find any functions in the drivers to do this. Is there a way to?
0 Kudos
Message 1 of 3
(3,397 Views)
Steve,

I turn up nothing on my end as well after digging through all of the functions within the Excel Report driver.  However, it seems to me like you could write a Macro to take care of the sizing, then use the RunMacro function to call said Macro.  The function takes a handle to the application and the name of the Macro you want to run.
Derrick S.
Product Manager
NI DIAdem
National Instruments
0 Kudos
Message 2 of 3
(3,367 Views)
Hello Steve,

The "Excel Report" interface only provides a small subset of the full Excel functionality. It's intended to be an easy-to-use interface for basic functionality. For something more advanced, such as what you want to do now, you'll have to use the lower-level C interface, which is a direct wrapper of the original Excel interface.

The good news is that you can easily combine the two interfaces. You'll notice that whenever you use excelreport.fp in a program, the "Microsoft Excel 9.0 Object Library" instrument also gets loaded automatically by CVI. What you have to do in your case is to use a couple of functions from that instrument. The code below should do it (assuming you are changing the point size for the first series in the chart):

    Excel_ChartSeriesCollection (chartHandle, NULL, CA_VariantInt(1), &seriesHandle);
    Excel_SetProperty (seriesHandle, NULL, Excel_PointMarkerSize, CAVT_LONG, 2);

Good luck!

Luis

Message 3 of 3
(3,354 Views)