LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

labwindows_chart_help

Hello i I'm using LabWindows CVI ver. 5.0...
I'm developing excel application,I have transferred 2 data arrays to excel and made chart...
But my chart format isn't like a line format 😞
here is my code :
            Excel_ChartChartWizard (ExcelChartsHandle, NULL,
                                    CA_VariantDispatch (GrafikSINIR),
                                    CA_VariantInt(ExcelConst_xlLine),
                                    CA_DEFAULT_VAL,
                                    CA_VariantInt(ExcelConst_xlColumns),
                                    CA_DEFAULT_VAL, CA_DEFAULT_VAL,
                                    CA_DEFAULT_VAL, MyVariant, CA_DEFAULT_VAL,
                                    CA_DEFAULT_VAL, CA_DEFAULT_VAL);

how can fix my problem?
thanx your suggestions...
and I tried attach two pictures lots of times but couldn't.
0 Kudos
Message 1 of 3
(2,971 Views)
Hi anatolia,

If your Excel uses the same prototype that mine does, you can change the "gallery" parameter to "xLine".  Here is a link that explains where your version of Excel's help is, if it's installed, so you can check the possible parameter values of your Excel's ChartWizard function.

http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q222101&
Gavin Fox
Systems Software
National Instruments
0 Kudos
Message 2 of 3
(2,952 Views)
Thanks a lot, I solved my problem...
I have written a macro in excel like that :
   
    Sub Line_Chart()
    With Worksheets(1).ChartObjects(1).Chart
        .ChartType = xlLine
    End With
    End Sub

This  macro  changes  the  chart  type  as  line.Then  I have written like this code in LabWindowsCVI to run my macro :
   .
   .
   .
 static VARIANT    YAZI;
   .
   .
   .

            CA_VariantClear(&YAZI);   
            CA_VariantSetCString (&YAZI, "sabit.xls!Sayfa1.Line_Chart");                             /*  this is name of the macro */
            Excel_AppRun (ExcelAppHandle, NULL, YAZI, CA_DEFAULT_VAL,
                          CA_DEFAULT_VAL, CA_DEFAULT_VAL, CA_DEFAULT_VAL,
                          CA_DEFAULT_VAL, CA_DEFAULT_VAL, CA_DEFAULT_VAL,
                          CA_DEFAULT_VAL, CA_DEFAULT_VAL, CA_DEFAULT_VAL,
                          CA_DEFAULT_VAL, CA_DEFAULT_VAL, CA_DEFAULT_VAL,
                          CA_DEFAULT_VAL, CA_DEFAULT_VAL, CA_DEFAULT_VAL,
                          CA_DEFAULT_VAL, CA_DEFAULT_VAL, CA_DEFAULT_VAL,
                          CA_DEFAULT_VAL, CA_DEFAULT_VAL, CA_DEFAULT_VAL,
                          CA_DEFAULT_VAL, CA_DEFAULT_VAL, CA_DEFAULT_VAL,
                          CA_DEFAULT_VAL, CA_DEFAULT_VAL, CA_DEFAULT_VAL,
                          CA_DEFAULT_VAL, CA_DEFAULT_VAL, NULL);

This is my solution,
but I'm sure that, in somewhere there is a better method than mineSmiley Wink

Message Edited by anatolia_levent on 02-19-2007 12:34 PM

0 Kudos
Message 3 of 3
(2,925 Views)