55 for(
unsigned libNdx = 0; libNdx<nicks.size(); ++libNdx )
57 wxArrayString fpnames;
61 for(
unsigned nameNdx = 0; nameNdx<fpnames.size(); ++nameNdx )
63 if( fpname == fpnames[nameNdx] )
86 bool hasMissingNicks =
false;
112 hasMissingNicks =
true;
117 if( hasMissingNicks )
119 msg =
_(
"Some of the assigned footprints are legacy entries with no library names. Would "
120 "you like KiCad to attempt to convert them to the new required LIB_ID format? "
121 "(If you answer no, then these assignments will be cleared and you will need to "
122 "re-assign them manually.)" );
124 if(
IsOK(
this, msg ) )
148 msg += wxString::Format(
_(
"Component '%s' footprint '%s' <b>not "
149 "found</b> in any library.\n" ),
155 msg += wxString::Format(
_(
"Component '%s' footprint '%s' was found "
156 "in <b>multiple</b> libraries.\n" ),
167 msg += wxT(
"\n\n" );
168 msg +=
_(
"First check your footprint library table entries." );
170 wxMessageBox( msg,
_(
"Problematic Footprint Library Tables" ) );
178 dlg.
MessageSet(
_(
"The following errors occurred attempting to convert the "
179 "footprint assignments:\n\n" ) );
181 dlg.
MessageSet(
_(
"\nYou will need to reassign them manually if you want them "
182 "to be updated correctly the next time you import the "
183 "netlist in Pcbnew." ) );
214 std::vector <int > m_indexes;
226 m_indexes.push_back( ii );
232 if( m_indexes.size() > 0 )
236 for(
unsigned ii = 0; ii < m_indexes.size(); ii++ )
246 if( dlg.ShowModal() == wxID_OK )
249 for(
unsigned ii = 0; ii < m_indexes.size(); ii++ )
261 int firstUnassigned = wxNOT_FOUND;
275 if( firstUnassigned == wxNOT_FOUND && component->
GetFPID().
empty() )
282 if( firstUnassigned >= 0 )
301 if( doSaveSchematic )
306 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 &aNickname)
Override the logical library name portion of the LIB_ID to aNickname.
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
virtual FP_LIB_TABLE * PcbFootprintLibs(KIWAY &aKiway)
Return the table of footprint libraries.
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)