57 for(
unsigned libNdx = 0; libNdx<nicks.size(); ++libNdx )
59 wxArrayString fpnames;
63 for(
unsigned nameNdx = 0; nameNdx<fpnames.size(); ++nameNdx )
65 if( fpname == fpnames[nameNdx] )
88 bool hasMissingNicks =
false;
114 hasMissingNicks =
true;
119 if( hasMissingNicks )
121 msg =
_(
"Some of the assigned footprints are legacy entries with no library names. Would "
122 "you like KiCad to attempt to convert them to the new required LIB_ID format? "
123 "(If you answer no, then these assignments will be cleared and you will need to "
124 "re-assign them manually.)" );
126 if(
IsOK(
this, msg ) )
150 msg += wxString::Format(
_(
"Component '%s' footprint '%s' <b>not "
151 "found</b> in any library.\n" ),
157 msg += wxString::Format(
_(
"Component '%s' footprint '%s' was found "
158 "in <b>multiple</b> libraries.\n" ),
169 msg += wxT(
"\n\n" );
170 msg +=
_(
"First check your footprint library table entries." );
172 wxMessageBox( msg,
_(
"Problematic Footprint Library Tables" ) );
180 dlg.
MessageSet(
_(
"The following errors occurred attempting to convert the "
181 "footprint assignments:\n\n" ) );
183 dlg.
MessageSet(
_(
"\nYou will need to reassign them manually if you want them "
184 "to be updated correctly the next time you import the "
185 "netlist in Pcbnew." ) );
216 std::vector <int > m_indexes;
228 m_indexes.push_back( ii );
234 if( m_indexes.size() > 0 )
238 for(
unsigned ii = 0; ii < m_indexes.size(); ii++ )
251 for(
unsigned ii = 0; ii < m_indexes.size(); ii++ )
263 int firstUnassigned = wxNOT_FOUND;
277 if( firstUnassigned == wxNOT_FOUND && component->
GetFPID().
empty() )
284 if( firstUnassigned >= 0 )
303 if( doSaveSchematic )
308 if( payload ==
"success" )
Store all of the related footprint 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 FootprintEnumerate(wxArrayString &aFootprintNames, const wxString &aNickname, bool aBestEfforts)
Return a list of footprint names contained within the library given by aNickname.
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)
Send aPayload to aDestination from aSource.
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.
std::vector< wxString > GetLogicalLibs()
Return the logical library names, all of them that are pertinent to a look up done on this LIB_TABLE.
unsigned GetCount() const
COMPONENT * GetComponent(unsigned aIndex)
Return the COMPONENT at aIndex.
void FormatCvpcbNetlist(OUTPUTFORMATTER *aOut)
bool AnyFootprintsLinked() const
static FP_LIB_TABLE * PcbFootprintLibs(PROJECT *aProject)
Return the table of footprint libraries without Kiway.
void SetSelection(int index, bool State=true)
void AppendWarning(int index)
void AppendLine(const wxString &text)
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(FP_LIB_TABLE *aTbl, LIB_ID *aFootprintId)
Return true if the resultant LIB_ID has a certain nickname.
wxString From_UTF8(const char *cstring)