bool SCH_EDIT_FRAME::prepareForNetlist()
{
    SCH_SHEET_LIST sheets( g_RootSheet );

    sheets.AnnotatePowerSymbols( Prj().SchLibs() );

    // Performs some controls:
    if( CheckAnnotate( NULL, 0 ) )
    {
        // Schematic must be annotated: call Annotate dialog and tell
        // the user why that is.
        InvokeDialogAnnotate( this,  _( "Exporting the netlist requires a "
                                        "completely\nannotated schematic." ) );

        if( CheckAnnotate( NULL, 0 ) )
            return false;
    }

    // Test duplicate sheet names:
    if( TestDuplicateSheetNames( false ) > 0 )
    {
        if( !IsOK( NULL, _( "Error: duplicate sheet names. Continue?" ) ) )
            return false;
    }

    // Cleanup the entire hierarchy
    SCH_SCREENS screens;

    screens.SchematicCleanUp();

    return true;
}
Example #2
0
void SCH_EDIT_FRAME::OnAnnotate( wxCommandEvent& event )
{
    InvokeDialogAnnotate( this );
}