54 for(
unsigned libNdx = 0; libNdx < nicks.size(); ++libNdx )
81 bool hasMissingNicks =
false;
99 for(
unsigned i = 0; i <
m_netlist.GetCount(); i++ )
107 hasMissingNicks =
true;
112 if( hasMissingNicks )
114 msg =
_(
"Some of the assigned footprints are legacy entries with no library names. Would "
115 "you like KiCad to attempt to convert them to the new required LIB_ID format? "
116 "(If you answer no, then these assignments will be cleared and you will need to "
117 "re-assign them manually.)" );
119 if(
IsOK(
this, msg ) )
125 for(
unsigned i = 0; i <
m_netlist.GetCount(); i++ )
143 msg += wxString::Format(
_(
"Component '%s' footprint '%s' <b>not "
144 "found</b> in any library.\n" ),
150 msg += wxString::Format(
_(
"Component '%s' footprint '%s' was found "
151 "in <b>multiple</b> libraries.\n" ),
162 msg += wxT(
"\n\n" );
163 msg +=
_(
"First check your footprint library table entries." );
165 wxMessageBox( msg,
_(
"Problematic Footprint Library Tables" ) );
173 dlg.
MessageSet(
_(
"The following errors occurred attempting to convert the "
174 "footprint assignments:\n\n" ) );
176 dlg.
MessageSet(
_(
"\nYou will need to reassign them manually if you want them "
177 "to be updated correctly the next time you import the "
178 "netlist in Pcbnew." ) );
193 for(
unsigned i = 0; i <
m_netlist.GetCount(); i++ )
209 std::vector <int > m_indexes;
211 for(
unsigned ii = 0; ii <
m_netlist.GetCount(); ii++ )
221 m_indexes.push_back( ii );
227 if( m_indexes.size() > 0 )
231 for(
unsigned ii = 0; ii < m_indexes.size(); ii++ )
244 for(
unsigned ii = 0; ii < m_indexes.size(); ii++ )
256 int firstUnassigned = wxNOT_FOUND;
259 for(
unsigned i = 0; i <
m_netlist.GetCount(); i++ )
270 if( firstUnassigned == wxNOT_FOUND && component->
GetFPID().
empty() )
277 if( firstUnassigned >= 0 )
296 if( doSaveSchematic )
301 if( payload ==
"success" )
Store all of the related component information found in a netlist.
const wxString & GetReference() const
const wxString & GetValue() const
void SetFPID(const LIB_ID &aFPID)
const LIB_ID & GetAltFPID() const
const LIB_ID & GetFPID() const
bool readNetListAndFpFiles(const std::string &aNetlist)
Load the netlist file built on the fly by Eeschema and loads footprint libraries from fp lib tables.
void BuildFootprintsList()
bool LoadFootprintFiles()
Read the list of footprint (*.mod files) and generate the list of footprints.
void SetStatusText(const wxString &aText, int aNumber=0) override
wxString formatSymbolDesc(int idx, const wxString &aReference, const wxString &aValue, const wxString &aFootprint)
void BuildLibrariesList()
void DisplayStatus()
Update the information displayed on the status bar at bottom of the main frame.
FOOTPRINT_LIST * m_FootprintsList
SYMBOLS_LISTBOX * m_symbolsListBox
int readSchematicNetlist(const std::string &aNetlist)
Read the netlist (.net) file built on the fly by Eeschema.
bool SaveFootprintAssociation(bool doSaveSchematic)
Save the edits that the user has done by sending them back to Eeschema via the kiway.
void Add(const wxString &aRef, const wxString &aFpSchName, const wxString &aFpCmpName)
Add a line to the selection list.
int GetSelection(const wxString &aReference)
bool Show(bool show) override
void MessageSet(const wxString &message)
Add a message (in bold) to message list.
void ListSet(const wxString &aList)
Add a list of items.
Hold an error message and may be used when throwing exceptions containing meaningful error messages.
virtual const wxString What() const
A composite of Problem() and Where()
PROJECT & Prj() const
Return a reference to the PROJECT associated with this KIWAY.
KIWAY & Kiway() const
Return a reference to the KIWAY that this object has an opportunity to participate in.
virtual void ExpressMail(FRAME_T aDestination, MAIL_T aCommand, std::string &aPayload, wxWindow *aSource=nullptr, bool aFromOtherThread=false)
Send aPayload to aDestination from aSource.
std::vector< wxString > GetLibraryNames() const
Returns a list of library nicknames that are available (skips any that failed to load)
A logical library item identifier and consists of various portions much like a URI.
int SetLibNickname(const UTF8 &aLibNickname)
Override the logical library name portion of the LIB_ID to aLibNickname.
const UTF8 & GetLibItemName() const
const UTF8 & GetLibNickname() const
Return the logical library name portion of a LIB_ID.
static FOOTPRINT_LIBRARY_ADAPTER * FootprintLibAdapter(PROJECT *aProject)
const char * c_str() const
std::string::size_type size() const
bool IsOK(wxWindow *aParent, const wxString &aMessage)
Display a yes/no dialog with aMessage and returns the user response.
This file is part of the common library.
static int guessNickname(FOOTPRINT_LIBRARY_ADAPTER *aAdapter, LIB_ID *aFootprintId)
Return true if the resultant LIB_ID has a certain nickname.
wxString From_UTF8(const char *cstring)