dialog_gendrill.cpp 19.2 KB
Newer Older
1
/**
2 3
 * @file dialog_gendrill.cpp
 */
4

5
/*
6
 * This program source code file is part of KiCad, a free EDA CAD application.
7
 *
8 9
 * Copyright (C) 1992-2012 Jean_Pierre Charras <jp.charras at wanadoo.fr>
 * Copyright (C) 1992-2012 KiCad Developers, see change_log.txt for contributors.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, you may find one here:
 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * or you may search the http://www.gnu.org website for the version 2 license,
 * or you may write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 */
28

29 30 31 32 33
#include <fctsys.h>
#include <appl_wxstruct.h>
#include <pcbnew.h>
#include <wxPcbStruct.h>
#include <pcbplot.h>
34
#include <gendrill_Excellon_writer.h>
35
#include <macros.h>
36

37 38 39
#include <class_board.h>
#include <class_track.h>
#include <class_module.h>
40

41
#include <dialog_gendrill.h>
42
#include <wildcards_and_files_ext.h>
43 44 45 46 47 48 49 50 51


// Keywords for read and write config
#define ZerosFormatKey          wxT( "DrillZerosFormat" )
#define PrecisionKey            wxT( "DrilltPrecisionOpt" )
#define MirrorKey               wxT( "DrillMirrorYOpt" )
#define MinimalHeaderKey        wxT( "DrillMinHeader" )
#define UnitDrillInchKey        wxT( "DrillUnit" )
#define DrillOriginIsAuxAxisKey wxT( "DrillAuxAxis" )
52
#define DrillMapFileTypeKey     wxT( "DrillMapFileType" )
53

54
// list of allowed precision for EXCELLON files, for integer format:
55
// Due to difference between inches and mm,
56 57 58
// there are 2 precision values, one for inches and one for metric
static DRILL_PRECISION precisionListForInches( 2, 4 );
static DRILL_PRECISION precisionListForMetric( 3, 3 );
59 60 61 62 63 64 65 66 67 68 69 70 71


/* This function displays the dialog frame for drill tools
 */
void PCB_EDIT_FRAME::InstallDrillFrame( wxCommandEvent& event )
{
    DIALOG_GENDRILL dlg( this );

    dlg.ShowModal();
}



72
DIALOG_GENDRILL::DIALOG_GENDRILL( PCB_EDIT_FRAME* parent ) :
73 74
    DIALOG_GENDRILL_BASE( parent )
{
75 76
    m_parent = parent;
    m_board  = parent->GetBoard();
77 78
    m_config = wxGetApp().GetSettings();
    m_plotOpts = m_parent->GetPlotSettings();
79 80 81 82 83 84 85 86

    SetReturnCode( 1 );
    initDialog();
    GetSizer()->SetSizeHints( this );
}


// Static members of DIALOG_GENDRILL
87 88
int DIALOG_GENDRILL::m_UnitDrillIsInch = true;
int DIALOG_GENDRILL::m_ZerosFormat     = EXCELLON_WRITER::DECIMAL_FORMAT;
89
bool DIALOG_GENDRILL::m_MinimalHeader   = false;
90
bool DIALOG_GENDRILL::m_Mirror = false;
91
bool DIALOG_GENDRILL::m_DrillOriginIsAuxAxis = false;
92
int DIALOG_GENDRILL::m_mapFileType = 1;
93 94 95 96 97 98 99 100 101 102


DIALOG_GENDRILL::~DIALOG_GENDRILL()
{
    UpdateConfig();
}


void DIALOG_GENDRILL::initDialog()
{
103 104 105 106 107 108
    m_config->Read( ZerosFormatKey, &m_ZerosFormat );
    m_config->Read( MirrorKey, &m_Mirror );
    m_config->Read( MinimalHeaderKey, &m_MinimalHeader );
    m_config->Read( UnitDrillInchKey, &m_UnitDrillIsInch );
    m_config->Read( DrillOriginIsAuxAxisKey, &m_DrillOriginIsAuxAxis );
    m_config->Read( DrillMapFileTypeKey, &m_mapFileType );
109

110 111 112
    InitDisplayParams();
}

113

114
void DIALOG_GENDRILL::InitDisplayParams()
115 116 117 118 119
{
    wxString msg;

    m_Choice_Unit->SetSelection( m_UnitDrillIsInch ? 1 : 0 );
    m_Choice_Zeros_Format->SetSelection( m_ZerosFormat );
120
    UpdatePrecisionOptions();
121 122 123 124 125 126
    m_Check_Minimal->SetValue( m_MinimalHeader );

    if( m_DrillOriginIsAuxAxis )
        m_Choice_Drill_Offset->SetSelection( 1 );

    m_Check_Mirror->SetValue( m_Mirror );
127
    m_Choice_Drill_Map->SetSelection( m_mapFileType );
128 129 130 131 132
    m_ViaDrillValue->SetLabel( _( "Use Netclasses values" ) );
    m_MicroViaDrillValue->SetLabel( _( "Use Netclasses values" ) );

    // See if we have some buried vias or/and microvias, and display
    // microvias drill value if so
133 134 135
    m_throughViasCount = 0;
    m_microViasCount   = 0;
    m_blindOrBuriedViasCount = 0;
136

137
    for( TRACK* track = m_parent->GetBoard()->m_Track; track != NULL; track = track->Next() )
138
    {
139
        if( track->Type() != PCB_VIA_T )
140
            continue;
141

Dick Hollenbeck's avatar
Dick Hollenbeck committed
142
        if( track->GetShape() == VIA_THROUGH )
143
            m_throughViasCount++;
Dick Hollenbeck's avatar
Dick Hollenbeck committed
144
        else if( track->GetShape() == VIA_MICROVIA )
145
            m_microViasCount++;
Dick Hollenbeck's avatar
Dick Hollenbeck committed
146
        else if( track->GetShape() == VIA_BLIND_BURIED )
147
            m_blindOrBuriedViasCount++;
148 149
    }

150
    m_MicroViaDrillValue->Enable( m_microViasCount );
151

Dick Hollenbeck's avatar
Dick Hollenbeck committed
152
    // Count plated pad holes and not plated pad holes:
153 154
    m_platedPadsHoleCount    = 0;
    m_notplatedPadsHoleCount = 0;
155

156
    for( MODULE* module = m_parent->GetBoard()->m_Modules;  module;  module = module->Next() )
157
    {
158
        for( D_PAD* pad = module->Pads(); pad != NULL; pad = pad->Next() )
159
        {
Dick Hollenbeck's avatar
Dick Hollenbeck committed
160
            if( pad->GetDrillShape() == PAD_CIRCLE )
161
            {
Dick Hollenbeck's avatar
Dick Hollenbeck committed
162
                if( pad->GetDrillSize().x != 0 )
163
                {
Dick Hollenbeck's avatar
Dick Hollenbeck committed
164
                    if( pad->GetAttribute() == PAD_HOLE_NOT_PLATED )
165 166 167 168
                        m_notplatedPadsHoleCount++;
                    else
                        m_platedPadsHoleCount++;
                }
169 170
            }
            else
171
            {
172
                if( pad->GetDrillSize().x != 0 && pad->GetDrillSize().y != 0 )
173
                {
Dick Hollenbeck's avatar
Dick Hollenbeck committed
174
                    if( pad->GetAttribute() == PAD_HOLE_NOT_PLATED )
175 176 177 178
                        m_notplatedPadsHoleCount++;
                    else
                        m_platedPadsHoleCount++;
                }
179
            }
180 181 182
        }
    }

183 184 185 186 187 188 189 190
    // Display hole counts:
    msg = m_PlatedPadsCountInfoMsg->GetLabel();
    msg << wxT( " " ) << m_platedPadsHoleCount;
    m_PlatedPadsCountInfoMsg->SetLabel( msg );

    msg = m_NotPlatedPadsCountInfoMsg->GetLabel();
    msg << wxT( " " ) << m_notplatedPadsHoleCount;
    m_NotPlatedPadsCountInfoMsg->SetLabel( msg );
191 192

    msg = m_ThroughViasInfoMsg->GetLabel();
193
    msg << wxT( " " ) << m_throughViasCount;
194 195 196
    m_ThroughViasInfoMsg->SetLabel( msg );

    msg = m_MicroViasInfoMsg->GetLabel();
197
    msg << wxT( " " ) << m_microViasCount;
198 199 200
    m_MicroViasInfoMsg->SetLabel( msg );

    msg = m_BuriedViasInfoMsg->GetLabel();
201
    msg << wxT( " " ) << m_blindOrBuriedViasCount;
202
    m_BuriedViasInfoMsg->SetLabel( msg );
203 204 205

    // Output directory
    m_outputDirectoryName->SetValue( m_plotOpts.GetOutputDirectory() );
206 207
}

208

209 210 211 212
void DIALOG_GENDRILL::UpdateConfig()
{
    SetParams();

213 214 215 216 217
    m_config->Write( ZerosFormatKey, m_ZerosFormat );
    m_config->Write( MirrorKey, m_Mirror );
    m_config->Write( MinimalHeaderKey, m_MinimalHeader );
    m_config->Write( UnitDrillInchKey, m_UnitDrillIsInch );
    m_config->Write( DrillOriginIsAuxAxisKey, m_DrillOriginIsAuxAxis );
218
    m_config->Write( DrillMapFileTypeKey, m_mapFileType );
219 220
}

221

222 223
void DIALOG_GENDRILL::OnSelDrillUnitsSelected( wxCommandEvent& event )
{
224
    UpdatePrecisionOptions();
225 226
}

227 228 229 230
void DIALOG_GENDRILL::OnGenMapFile( wxCommandEvent& event )
{
    GenDrillAndMapFiles( false, true);
}
231

232
void DIALOG_GENDRILL::OnGenDrillFile( wxCommandEvent& event )
233
{
234
    GenDrillAndMapFiles(true, false);
235 236 237 238 239
}


void DIALOG_GENDRILL::OnCancelClick( wxCommandEvent& event )
{
Dick Hollenbeck's avatar
Dick Hollenbeck committed
240
    UpdateConfig();                 // Save drill options:
241
    EndModal( wxID_CANCEL );        // Process the default cancel event (close dialog)
242 243 244 245 246
}


void DIALOG_GENDRILL::OnSelZerosFmtSelected( wxCommandEvent& event )
{
247
    UpdatePrecisionOptions();
248 249 250
}


251
void DIALOG_GENDRILL::UpdatePrecisionOptions()
252 253
{
    if( m_Choice_Unit->GetSelection()== 1 )     // Units = inches
254
        m_staticTextPrecision->SetLabel( precisionListForInches.GetPrecisionString() );
255 256
    else
    {
Dick Hollenbeck's avatar
Dick Hollenbeck committed
257
        // metric options
258
        m_staticTextPrecision->SetLabel( precisionListForMetric.GetPrecisionString() );
259
    }
260

261
    if( m_Choice_Zeros_Format->GetSelection() == EXCELLON_WRITER::DECIMAL_FORMAT )
262
        m_staticTextPrecision->Enable( false );
263
    else
264
        m_staticTextPrecision->Enable( true );
265 266
}

267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301
void DIALOG_GENDRILL::OnOutputDirectoryBrowseClicked( wxCommandEvent& event )
{
    // Build the absolute path of current output plot directory
    // to preselect it when opening the dialog.
    wxFileName  fn( m_outputDirectoryName->GetValue() );
    wxString    path;

    if( fn.IsRelative() )
        path = wxGetCwd() + fn.GetPathSeparator() + m_outputDirectoryName->GetValue();
    else
        path = m_outputDirectoryName->GetValue();

    wxDirDialog dirDialog( this, _( "Select Output Directory" ), path );

    if( dirDialog.ShowModal() == wxID_CANCEL )
        return;

    wxFileName      dirName = wxFileName::DirName( dirDialog.GetPath() );

    wxMessageDialog dialog( this, _( "Use a relative path? " ),
                            _( "Plot Output Directory" ),
                            wxYES_NO | wxICON_QUESTION | wxYES_DEFAULT );

    if( dialog.ShowModal() == wxID_YES )
    {
        wxString boardFilePath = ( (wxFileName) m_parent->GetBoard()->GetFileName() ).GetPath();

        if( !dirName.MakeRelativeTo( boardFilePath ) )
            wxMessageBox( _(
                              "Cannot make path relative (target volume different from board file volume)!" ),
                          _( "Plot Output Directory" ), wxOK | wxICON_ERROR );
    }

    m_outputDirectoryName->SetValue( dirName.GetFullPath() );
}
302

303
void DIALOG_GENDRILL::SetParams()
304 305 306
{
    wxString msg;

307 308 309 310 311
    // Set output directory and replace backslashes with forward ones
    wxString dirStr;
    dirStr = m_outputDirectoryName->GetValue();
    dirStr.Replace( wxT( "\\" ), wxT( "/" ) );
    m_plotOpts.SetOutputDirectory( dirStr );
312

313
    m_mapFileType = m_Choice_Drill_Map->GetSelection();
314

315
    m_UnitDrillIsInch = (m_Choice_Unit->GetSelection() == 0) ? false : true;
316 317 318 319 320 321 322 323
    m_MinimalHeader   = m_Check_Minimal->IsChecked();
    m_Mirror = m_Check_Mirror->IsChecked();
    m_ZerosFormat = m_Choice_Zeros_Format->GetSelection();
    m_DrillOriginIsAuxAxis = m_Choice_Drill_Offset->GetSelection();

    if( m_Choice_Drill_Offset->GetSelection() == 0 )
        m_FileDrillOffset = wxPoint( 0, 0 );
    else
324
        m_FileDrillOffset = m_parent->GetOriginAxisPosition();
325 326

    if( m_UnitDrillIsInch )
327
        m_Precision = precisionListForInches;
328
    else
329
        m_Precision = precisionListForMetric;
330

331 332 333 334 335 336
    m_board->SetPlotOptions( m_plotOpts );
}

/**
 * Function GenDrillAndMapFiles
 * Calls the functions to create EXCELLON drill files and/or drill map files
337
 * >When all holes are through holes, only one excellon file is created.
338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433
 * >When there are some partial holes (some blind or buried vias),
 *  one excellon file is created, for all plated through holes,
 *  and one file per layer pair, which have one or more holes, excluding
 *  through holes, already in the first file.
 *  one file for all Not Plated through holes
 */
void DIALOG_GENDRILL::GenDrillAndMapFiles(bool aGenDrill, bool aGenMap)
{
    wxString   layer_extend;              /* added to the  Board FileName to
                                           * create FullFileName (= Board
                                           * FileName + layer pair names) */
    wxString   msg;
    bool       hasBuriedVias = false;  /* If true, drill files are created
                                        * layer pair by layer pair for
                                        * buried vias */
    int        layer1 = LAYER_N_BACK;
    int        layer2 = LAYER_N_FRONT;
    bool       gen_through_holes = true;
    bool       gen_NPTH_holes    = false;

    wxString   currentWD = ::wxGetCwd();

    UpdateConfig(); // set params and Save drill options

    m_parent->ClearMsgPanel();

    if( m_microViasCount || m_blindOrBuriedViasCount )
        hasBuriedVias = true;

    EXCELLON_WRITER excellonWriter( m_parent->GetBoard(),
                                    m_FileDrillOffset );
    excellonWriter.SetFormat( !m_UnitDrillIsInch,
                              (EXCELLON_WRITER::zeros_fmt) m_ZerosFormat,
                              m_Precision.m_lhs, m_Precision.m_rhs );
    excellonWriter.SetOptions( m_Mirror, m_MinimalHeader, m_FileDrillOffset );

    wxFileName fn;

    for( ; ; )
    {
        excellonWriter.BuildHolesList( layer1, layer2,
                          gen_through_holes ? false : true, gen_NPTH_holes );

        if( excellonWriter.GetHolesCount() > 0 ) // has holes?
        {
            fn = m_parent->GetBoard()->GetFileName();
            layer_extend.Empty();

            if( gen_NPTH_holes )
            {
                layer_extend << wxT( "-NPTH" );
            }
            else if( !gen_through_holes )
            {
                if( layer1 == LAYER_N_BACK )
                    layer_extend << wxT( "-back" );
                else
                    layer_extend << wxT( "-inner" ) << layer1;
                if( layer2 == LAYER_N_FRONT )
                    layer_extend << wxT( "-front" );
                else
                    layer_extend << wxT( "-inner" ) << layer2;
            }

            fn.SetName( fn.GetName() + layer_extend );
            wxString defaultPath = m_plotOpts.GetOutputDirectory();
            if( defaultPath.IsEmpty() )
                defaultPath = ::wxGetCwd();

            fn.SetPath( defaultPath );

            if( aGenDrill )
            {
                fn.SetExt( DrillFileExtension );
                wxString fullFilename = fn.GetFullPath();

                FILE* file = wxFopen( fullFilename, wxT( "w" ) );

                if( file == 0 )
                {
                    msg.Printf( _( "** Unable to create %s **\n" ),
                                GetChars( fullFilename ) );
                    m_messagesBox->AppendText( msg );
                    break;
                }
                else
                {
                    msg.Printf( _( "Plot: %s OK\n" ), GetChars( fullFilename ) );
                    m_messagesBox->AppendText( msg );
                }

                excellonWriter.CreateDrillFile( file );
            }

            if( aGenMap )
            {
434
                const PlotFormat filefmt[6] =
435 436
                {   // Keep these format ids in the same order than m_Choice_Drill_Map choices
                    PLOT_FORMAT_HPGL, PLOT_FORMAT_POST, PLOT_FORMAT_GERBER,
437
                    PLOT_FORMAT_DXF, PLOT_FORMAT_SVG, PLOT_FORMAT_PDF
438 439 440
                };
                unsigned choice = (unsigned) m_Choice_Drill_Map->GetSelection();

441
                if( choice >= m_Choice_Drill_Map->GetCount() )
442 443
                    choice = 1;

444 445
                fn.SetExt( wxEmptyString ); // Will be added by GenDrillMap
                wxString fullfilename = fn.GetFullPath() + wxT( "-drl_map" );
446

447
                GenDrillMap( fullfilename, excellonWriter, filefmt[choice] );
448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527
            }
        }

        if( gen_NPTH_holes )    // The last drill file was created
            break;

        if( !hasBuriedVias )
            gen_NPTH_holes = true;
        else
        {
            if(  gen_through_holes )
                layer2 = layer1 + 1;    // prepare generation of first layer pair
            else
            {
                if( layer2 >= LAYER_N_FRONT )    // no more layer pair to consider
                {
                    layer1 = LAYER_N_BACK;
                    layer2 = LAYER_N_FRONT;
                    gen_NPTH_holes = true;
                    continue;
                }
                layer1++;
                layer2++;                      // use next layer pair

                if( layer2 == m_parent->GetBoard()->GetCopperLayerCount() - 1 )
                    layer2 = LAYER_N_FRONT;         // the last layer is always the
                                                    // Front layer
            }

            gen_through_holes = false;
        }
    }

    ::wxSetWorkingDirectory( currentWD );
}


/*
 *  Create a plain text report file giving a list of drill values and drill count
 *  for through holes, oblong holes, and for buried vias,
 *  drill values and drill count per layer pair
 */
void DIALOG_GENDRILL::OnGenReportFile( wxCommandEvent& event )
{
    UpdateConfig(); // set params and Save drill options

    wxFileName fn = m_parent->GetBoard()->GetFileName();

    fn.SetName( fn.GetName() + wxT( "-drl" ) );
    fn.SetExt( ReportFileExtension );

    wxString defaultPath = m_plotOpts.GetOutputDirectory();
    if( defaultPath.IsEmpty() )
        defaultPath = ::wxGetCwd();

    wxFileDialog dlg( this, _( "Save Drill Report File" ), defaultPath,
                      fn.GetFullName(), wxGetTranslation( ReportFileWildcard ),
                      wxFD_SAVE );

    if( dlg.ShowModal() == wxID_CANCEL )
        return;

    EXCELLON_WRITER excellonWriter( m_parent->GetBoard(),
                                    m_FileDrillOffset );
    excellonWriter.SetFormat( !m_UnitDrillIsInch,
                              (EXCELLON_WRITER::zeros_fmt) m_ZerosFormat,
                              m_Precision.m_lhs, m_Precision.m_rhs );
    excellonWriter.SetOptions( m_Mirror, m_MinimalHeader, m_FileDrillOffset );

    bool success = excellonWriter.GenDrillReportFile( dlg.GetPath() );

    wxString   msg;

    if( ! success )
    {
        msg.Printf(  _( "** Unable to create %s **\n" ), GetChars( dlg.GetPath() ) );
        m_messagesBox->AppendText( msg );
    }
    else
    {
528
        msg.Printf( _( "Report file %s created\n" ), GetChars( dlg.GetPath() ) );
529 530 531 532 533 534
        m_messagesBox->AppendText( msg );
    }
}


// Generate the drill map of the board
535
void DIALOG_GENDRILL::GenDrillMap( const wxString aFullFileNameWithoutExt,
536 537 538 539 540 541 542 543 544 545 546 547 548 549 550
                                   EXCELLON_WRITER& aExcellonWriter,
                                   PlotFormat     format )
{
    wxString   ext, wildcard;

    /* Init extension */
    switch( format )
    {
    case PLOT_FORMAT_HPGL:
        ext = HPGL_PLOTTER::GetDefaultFileExtension();
        wildcard = _( "HPGL plot files (.plt)|*.plt" );
        break;

    case PLOT_FORMAT_POST:
        ext = PS_PLOTTER::GetDefaultFileExtension();
551
        wildcard = PSFileWildcard;
552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568
        break;

    case PLOT_FORMAT_GERBER:
        ext = GERBER_PLOTTER::GetDefaultFileExtension();
        wildcard = _( "Gerber files (.pho)|*.pho" );
        break;

    case PLOT_FORMAT_DXF:
        ext = DXF_PLOTTER::GetDefaultFileExtension();
        wildcard = _( "DXF files (.dxf)|*.dxf" );
        break;

    case PLOT_FORMAT_SVG:
        ext = SVG_PLOTTER::GetDefaultFileExtension();
        wildcard = SVGFileWildcard;
        break;

569 570 571 572 573
    case PLOT_FORMAT_PDF:
        ext = PDF_PLOTTER::GetDefaultFileExtension();
        wildcard = PdfFileWildcard;
        break;

574
    default:
575
        wxLogMessage( wxT( "DIALOG_GENDRILL::GenDrillMap() error, fmt % unkown" ), format );
576 577 578
        return;
    }

579 580 581
    // Add file name extension
    wxString fullFilename = aFullFileNameWithoutExt;
    fullFilename << wxT(".") << ext;
582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601

    bool success = aExcellonWriter.GenDrillMapFile( fullFilename,
                                                   m_parent->GetPageSettings(),
                                                   format );

    wxString   msg;

    if( ! success )
    {
        msg.Printf( _( "** Unable to create %s **\n" ),
                    GetChars( fullFilename ) );
        m_messagesBox->AppendText( msg );
        return;
    }
    else
    {
        msg.Printf( _( "Plot: %s OK\n" ), GetChars( fullFilename ) );
        m_messagesBox->AppendText( msg );
    }

602
}