LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

"double" fault and crash instead of CVI Print dialog

Hello,
since we upgraded from CVI5.01 to CVI8.0 the printout of a graph doesnt work correctly.
Only when I set  "SetPrintAttribute (ATTR_SYSTEM_PRINT_DIALOG_ONLY, 1);"
the printer specific dialog appears and printing is possible.
When I want to bring up the CVI Print Dialog by setting
"SetPrintAttribute (ATTR_SYSTEM_PRINT_DIALOG_ONLY,0);",
the program crashes with a message concerning a
"double" fault caused in the line
" printresult=PrintPanel (panel_accur, " ", 1, VAL_FULL_PANEL, 1);"
When I exclude program parts ,where the graph is filled with measuring points
 (done like that :"PlotXY (panel, graph, array_s_wert, array_fehler, index+1, VAL_DOUBLE,
                                            VAL_DOUBLE, VAL_CONNECTED_POINTS, dot, VAL_SOLID, 1, color); ")

the printout works , and the CVI Print DialogBox appears .
All other print attributes are left as default.
The uir-file that contains the graph is already  remade with CVI 8.0 .

Any ideas ?
Code segment :
                  SetCtrlAttribute (panel_accur, GENAU_STOP_MESSUNG, ATTR_DIMMED, 1);
                  SetCtrlAttribute (panel_accur, GENAU_PRINT, ATTR_DIMMED, 1);
                  tool5_GetString (pruefer, 29, "Pruefername");
                  SetCtrlVal (panel_accur, GENAU_TEXTMSG_4, pruefer);
                   SetPrintAttribute (ATTR_SYSTEM_PRINT_DIALOG_ONLY, 1); // OK , Printer Setup ,without  CVI Print Dialog
                // 
SetPrintAttribute (ATTR_SYSTEM_PRINT_DIALOG_ONLY, 0); // Crash  ,before CVI Print Dialog can appear
                  MessagePopup ("Grafik-Ausdruck", "Laser- oder Tintenstrahldrucker auswaehlen !");
                  printresult=PrintPanel (panel_accur, "", 1, VAL_FULL_PANEL, 1);
                 
                  if(printresult != 0)
                     {
                       if(printresult != 1024)  // Druck Abbruch im Windows -Dialog
                         {
                            sprintf(text ,"Fehler beim Druck \n Fehlercode %i  !",printresult);
                            MessagePopup("Accuracy Messung",text);
                         }
                        
                        }
                  SetCtrlAttribute (panel_accur, GENAU_PRINT, ATTR_DIMMED, 0);     
                  SetCtrlAttribute (panel_accur, GENAU_STOP_MESSUNG, ATTR_DIMMED, 0);
                 
                 

End of  code segment
0 Kudos
Message 1 of 2
(3,398 Views)
Looks like you posted multiple times. See this link for a response.

Bilal Durrani
NI
0 Kudos
Message 2 of 2
(3,351 Views)