kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #09250
New BOARD File Format (*.kicad_pcb)
-
To:
KiCad Developers <kicad-developers@xxxxxxxxxxxxxxxxxxx>
-
From:
Dick Hollenbeck <dick@xxxxxxxxxxx>
-
Date:
Fri, 14 Dec 2012 11:18:50 -0600
-
In-reply-to:
<50CB4761.2030703@wanadoo.fr>
-
User-agent:
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0
Guys,
Wayne & co.'s fabulous work on the new BOARD file format is now standard.
I have committed the changes necessary to use *.kicad_pcb as default.
This could a fairly disruptive change for some, but you can still load and save legacy
(*.brd) files. The new format is *.kicad_pcb, called KiCad format.
How do you make the transition?
Well you control that entirely:
1) File Save. When you "save" a BOARD now, this logic comes into play
pcbFileName = aFileName;
if( pcbFileName.GetExt() == LegacyPcbFileExtension )
pluginType = IO_MGR::LEGACY;
else
{
pluginType = IO_MGR::KICAD;
pcbFileName.SetExt( KiCadPcbFileExtension );
}
In otherwords, legacy stays in effect if it was in effect.
2) File Save As. The default file format is *.kicad_pcb unless you use the dropdown box
near the OK Cancel button to select legacy.
3) When launching pcbnew from kicad project manager, the project manager looks for both
the *.brd and *.kicad_pcb files.
It follows this logic when deciding which one to give to pcbnew:
void KICAD_MANAGER_FRAME::OnRunPcbNew( wxCommandEvent& event )
{
wxFileName legacy_board( m_ProjectFileName );
wxFileName kicad_board( m_ProjectFileName );
legacy_board.SetExt( LegacyPcbFileExtension );
kicad_board.SetExt( KiCadPcbFileExtension );
if( !legacy_board.FileExists() || kicad_board.FileExists() )
ExecuteFile( this, PCBNEW_EXE, QuoteFullPath( kicad_board ) );
else
ExecuteFile( this, PCBNEW_EXE, QuoteFullPath( legacy_board ) );
}
Give Wayne credit if you like it.
If you don't like it, well then submit a patch :)
Thanks,
Dick
Follow ups
References