Harvest -> Export
This commit is contained in:
parent
a6997e6236
commit
6417015b8a
|
@ -61,12 +61,12 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
||||||
GetCanvas()->Refresh();
|
GetCanvas()->Refresh();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_MENU_HARVEST_FOOTPRINTS_TO_LIBRARY:
|
case ID_MENU_EXPORT_FOOTPRINTS_TO_LIBRARY:
|
||||||
HarvestFootprintsToLibrary( false );
|
ExportFootprintsToLibrary( false );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_MENU_HARVEST_FOOTPRINTS_TO_NEW_LIBRARY:
|
case ID_MENU_EXPORT_FOOTPRINTS_TO_NEW_LIBRARY:
|
||||||
HarvestFootprintsToLibrary( true );
|
ExportFootprintsToLibrary( true );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -1067,7 +1067,7 @@ bool PCB_EDIT_FRAME::importFile( const wxString& aFileName, int aFileType )
|
||||||
|
|
||||||
// Extract a footprint library from the design and add it to the fp-lib-table
|
// Extract a footprint library from the design and add it to the fp-lib-table
|
||||||
wxString newLibPath;
|
wxString newLibPath;
|
||||||
HarvestFootprintsToLibrary( true, newfilename.GetName(), &newLibPath );
|
ExportFootprintsToLibrary( true, newfilename.GetName(), &newLibPath );
|
||||||
|
|
||||||
if( newLibPath.Length() > 0 )
|
if( newLibPath.Length() > 0 )
|
||||||
{
|
{
|
||||||
|
|
|
@ -609,12 +609,12 @@ bool FOOTPRINT_EDIT_FRAME::DeleteModuleFromLibrary( const LIB_ID& aFPID, bool aC
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PCB_EDIT_FRAME::HarvestFootprintsToLibrary( bool aStoreInNewLib, const wxString& aLibName,
|
void PCB_EDIT_FRAME::ExportFootprintsToLibrary( bool aStoreInNewLib, const wxString& aLibName,
|
||||||
wxString* aLibPath )
|
wxString* aLibPath )
|
||||||
{
|
{
|
||||||
if( GetBoard()->GetFirstFootprint() == NULL )
|
if( GetBoard()->GetFirstFootprint() == NULL )
|
||||||
{
|
{
|
||||||
DisplayInfoMessage( this, _( "No footprints to harvest!" ) );
|
DisplayInfoMessage( this, _( "No footprints to export!" ) );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -149,6 +149,17 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
|
||||||
submenuExport->Add( _( "Hyperlynx..." ), "",
|
submenuExport->Add( _( "Hyperlynx..." ), "",
|
||||||
ID_GEN_EXPORT_FILE_HYPERLYNX, export_step_xpm );
|
ID_GEN_EXPORT_FILE_HYPERLYNX, export_step_xpm );
|
||||||
|
|
||||||
|
submenuExport->AppendSeparator();
|
||||||
|
submenuExport->Add( _( "Export Footprints to Library..." ),
|
||||||
|
_( "Add footprints used on board to an existing footprint library\n"
|
||||||
|
"(does not remove other footprints from this library)" ),
|
||||||
|
ID_MENU_EXPORT_FOOTPRINTS_TO_LIBRARY, library_archive_xpm );
|
||||||
|
|
||||||
|
submenuExport->Add( _( "Export Footprints to New Library..." ),
|
||||||
|
_( "Create a new footprint library containing the footprints used on board\n"
|
||||||
|
"(if the library already exists it will be replaced)" ),
|
||||||
|
ID_MENU_EXPORT_FOOTPRINTS_TO_NEW_LIBRARY, library_archive_as_xpm );
|
||||||
|
|
||||||
fileMenu->Add( submenuExport );
|
fileMenu->Add( submenuExport );
|
||||||
|
|
||||||
// Fabrication Outputs submenu
|
// Fabrication Outputs submenu
|
||||||
|
@ -377,17 +388,6 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
|
||||||
toolsMenu->Add( PCB_ACTIONS::removeUnusedPads );
|
toolsMenu->Add( PCB_ACTIONS::removeUnusedPads );
|
||||||
toolsMenu->Add( PCB_ACTIONS::repairBoard );
|
toolsMenu->Add( PCB_ACTIONS::repairBoard );
|
||||||
|
|
||||||
toolsMenu->AppendSeparator();
|
|
||||||
toolsMenu->Add( _( "&Harvest Footprints to Library..." ),
|
|
||||||
_( "Add footprints used on board to an existing footprint library\n"
|
|
||||||
"(does not remove other footprints from this library)" ),
|
|
||||||
ID_MENU_HARVEST_FOOTPRINTS_TO_LIBRARY, library_archive_xpm );
|
|
||||||
|
|
||||||
toolsMenu->Add( _( "&Harvest Footprints to New Library..." ),
|
|
||||||
_( "Create a new footprint library containing the footprints used on board\n"
|
|
||||||
"(if the library already exists it will be replaced)" ),
|
|
||||||
ID_MENU_HARVEST_FOOTPRINTS_TO_NEW_LIBRARY, library_archive_as_xpm );
|
|
||||||
|
|
||||||
#if defined(KICAD_SCRIPTING_WXPYTHON)
|
#if defined(KICAD_SCRIPTING_WXPYTHON)
|
||||||
toolsMenu->AppendSeparator();
|
toolsMenu->AppendSeparator();
|
||||||
toolsMenu->Add( PCB_ACTIONS::showPythonConsole );
|
toolsMenu->Add( PCB_ACTIONS::showPythonConsole );
|
||||||
|
|
|
@ -128,8 +128,8 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME )
|
||||||
EVT_MENU( ID_GEN_EXPORT_FILE_STEP, PCB_EDIT_FRAME::OnExportSTEP )
|
EVT_MENU( ID_GEN_EXPORT_FILE_STEP, PCB_EDIT_FRAME::OnExportSTEP )
|
||||||
EVT_MENU( ID_GEN_EXPORT_FILE_HYPERLYNX, PCB_EDIT_FRAME::OnExportHyperlynx )
|
EVT_MENU( ID_GEN_EXPORT_FILE_HYPERLYNX, PCB_EDIT_FRAME::OnExportHyperlynx )
|
||||||
|
|
||||||
EVT_MENU( ID_MENU_HARVEST_FOOTPRINTS_TO_LIBRARY, PCB_EDIT_FRAME::Process_Special_Functions )
|
EVT_MENU( ID_MENU_EXPORT_FOOTPRINTS_TO_LIBRARY, PCB_EDIT_FRAME::Process_Special_Functions )
|
||||||
EVT_MENU( ID_MENU_HARVEST_FOOTPRINTS_TO_NEW_LIBRARY, PCB_EDIT_FRAME::Process_Special_Functions )
|
EVT_MENU( ID_MENU_EXPORT_FOOTPRINTS_TO_NEW_LIBRARY, PCB_EDIT_FRAME::Process_Special_Functions )
|
||||||
|
|
||||||
EVT_MENU( wxID_EXIT, PCB_EDIT_FRAME::OnQuit )
|
EVT_MENU( wxID_EXIT, PCB_EDIT_FRAME::OnQuit )
|
||||||
EVT_MENU( wxID_CLOSE, PCB_EDIT_FRAME::OnQuit )
|
EVT_MENU( wxID_CLOSE, PCB_EDIT_FRAME::OnQuit )
|
||||||
|
|
|
@ -616,7 +616,7 @@ public:
|
||||||
void RecreateCmpFileFromBoard( wxCommandEvent& aEvent );
|
void RecreateCmpFileFromBoard( wxCommandEvent& aEvent );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function HarvestFootprintsToLibrary
|
* Function ExportFootprintsToLibrary
|
||||||
* Save footprints in a library:
|
* Save footprints in a library:
|
||||||
* @param aStoreInNewLib:
|
* @param aStoreInNewLib:
|
||||||
* true : save footprints in a existing lib. Existing footprints will be kept
|
* true : save footprints in a existing lib. Existing footprints will be kept
|
||||||
|
@ -629,7 +629,7 @@ public:
|
||||||
* optional library name to create, stops dialog call.
|
* optional library name to create, stops dialog call.
|
||||||
* must be called with aStoreInNewLib as true
|
* must be called with aStoreInNewLib as true
|
||||||
*/
|
*/
|
||||||
void HarvestFootprintsToLibrary( bool aStoreInNewLib, const wxString& aLibName = wxEmptyString,
|
void ExportFootprintsToLibrary( bool aStoreInNewLib, const wxString& aLibName = wxEmptyString,
|
||||||
wxString* aLibPath = NULL );
|
wxString* aLibPath = NULL );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -78,8 +78,8 @@ enum pcbnew_ids
|
||||||
ID_POPUP_PCB_SELECT_WIDTH_END_RANGE,
|
ID_POPUP_PCB_SELECT_WIDTH_END_RANGE,
|
||||||
|
|
||||||
ID_MENU_RECOVER_BOARD_AUTOSAVE,
|
ID_MENU_RECOVER_BOARD_AUTOSAVE,
|
||||||
ID_MENU_HARVEST_FOOTPRINTS_TO_LIBRARY,
|
ID_MENU_EXPORT_FOOTPRINTS_TO_LIBRARY,
|
||||||
ID_MENU_HARVEST_FOOTPRINTS_TO_NEW_LIBRARY,
|
ID_MENU_EXPORT_FOOTPRINTS_TO_NEW_LIBRARY,
|
||||||
|
|
||||||
ID_GEN_EXPORT_FILE_IDF3,
|
ID_GEN_EXPORT_FILE_IDF3,
|
||||||
ID_GEN_EXPORT_FILE_VRML,
|
ID_GEN_EXPORT_FILE_VRML,
|
||||||
|
|
|
@ -301,11 +301,11 @@ bool ImportSpecctraSES( wxString& aFullFilename )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool HarvestFootprintsToLibrary( bool aStoreInNewLib, const wxString& aLibName, wxString* aLibPath )
|
bool ExportFootprintsToLibrary( bool aStoreInNewLib, const wxString& aLibName, wxString* aLibPath )
|
||||||
{
|
{
|
||||||
if( s_PcbEditFrame )
|
if( s_PcbEditFrame )
|
||||||
{
|
{
|
||||||
s_PcbEditFrame->HarvestFootprintsToLibrary( aStoreInNewLib, aLibName, aLibPath );
|
s_PcbEditFrame->ExportFootprintsToLibrary( aStoreInNewLib, aLibName, aLibPath );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -98,7 +98,7 @@ bool ExportVRML( const wxString& aFullFileName, double aMMtoWRMLunit,
|
||||||
bool ImportSpecctraSES( wxString& aFullFilename );
|
bool ImportSpecctraSES( wxString& aFullFilename );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function HarvestFootprintsToLibrary
|
* Function ExportFootprintsToLibrary
|
||||||
* Save footprints in a library:
|
* Save footprints in a library:
|
||||||
* @param aStoreInNewLib:
|
* @param aStoreInNewLib:
|
||||||
* true : save footprints in a existing lib. Existing footprints will be kept
|
* true : save footprints in a existing lib. Existing footprints will be kept
|
||||||
|
@ -111,7 +111,7 @@ bool ImportSpecctraSES( wxString& aFullFilename );
|
||||||
* optional library name to create, stops dialog call.
|
* optional library name to create, stops dialog call.
|
||||||
* must be called with aStoreInNewLib as true
|
* must be called with aStoreInNewLib as true
|
||||||
*/
|
*/
|
||||||
bool HarvestFootprintsToLibrary( bool aStoreInNewLib, const wxString& aLibName = wxEmptyString,
|
bool ExportFootprintsToLibrary( bool aStoreInNewLib, const wxString& aLibName = wxEmptyString,
|
||||||
wxString* aLibPath = NULL );
|
wxString* aLibPath = NULL );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue