51 for(
unsigned libNdx = 0; libNdx<nicks.size(); ++libNdx )
53 wxArrayString fpnames;
57 for(
unsigned nameNdx = 0; nameNdx<fpnames.size(); ++nameNdx )
59 if( fpname == fpnames[nameNdx] )
82 bool hasMissingNicks =
false;
108 hasMissingNicks =
true;
113 if( hasMissingNicks )
115 msg =
_(
"Some of the assigned footprints are legacy entries with no library names. Would " 116 "you like KiCad to attempt to convert them to the new required LIB_ID format? " 117 "(If you answer no, then these assignments will be cleared and you will need to " 118 "re-assign them manually.)" );
120 if(
IsOK(
this, msg ) )
145 "Component \"%s\" footprint \"%s\" was <b>not found</b> in any library.\n" ),
153 "Component \"%s\" footprint \"%s\" was found in <b>multiple</b> libraries.\n" ),
165 msg += wxT(
"\n\n" );
166 msg +=
_(
"First check your footprint library table entries." );
168 wxMessageBox( msg,
_(
"Problematic Footprint Library Tables" ) );
176 dlg.
MessageSet(
_(
"The following errors occurred attempting to convert the " 177 "footprint assignments:\n\n" ) );
179 dlg.
MessageSet(
_(
"\nYou will need to reassign them manually if you want them " 180 "to be updated correctly the next time you import the " 181 "netlist in Pcbnew." ) );
210 std::vector <int > m_indexes;
222 m_indexes.push_back( ii );
228 if( m_indexes.size() > 0 )
232 for(
unsigned ii = 0; ii < m_indexes.size(); ii++ )
242 if( dlg.ShowModal() == wxID_OK )
246 for(
unsigned ii = 0; ii < m_indexes.size(); ii++ )
290 if( doSaveSchematic )
295 if( payload ==
"success" )
const UTF8 & GetLibItemName() const
KIWAY & Kiway() const
Return a reference to the KIWAY that this object has an opportunity to participate in.
static wxString FROM_UTF8(const char *cstring)
Convert a UTF8 encoded C string to a wxString for all wxWidgets build modes.
void FormatCvpcbNetlist(OUTPUTFORMATTER *aOut)
#define CMP_FORMAT
The print format to display a schematic component line.
void SetFPID(const LIB_ID &aFPID)
This file is part of the common library.
bool AnyFootprintsLinked() const
Function AnyFootprintsLinked.
COMPONENTS_LISTBOX * m_compListBox
void SetSelection(int index, bool State=true)
int ReadSchematicNetlist(const std::string &aNetlist)
Function ReadSchematicNetlist read the netlist (.net) file built on the fly by Eeschema.
unsigned GetCount() const
Function GetCount.
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.
bool LoadFootprintFiles()
Function LoadFootprintFiles reads the list of footprint (*.mod files) and generate the list of footpr...
static int guessNickname(FP_LIB_TABLE *aTbl, LIB_ID *aFootprintId)
Return true if the resultant LIB_ID has a certain nickname.
void AppendLine(const wxString &text)
const char * c_str() const
const LIB_ID & GetFPID() const
void FootprintEnumerate(wxArrayString &aFootprintNames, const wxString &aNickname, bool aBestEfforts)
Return a list of footprint names contained within the library given by aNickname.
const LIB_ID & GetAltFPID() const
virtual const wxString What() const
A composite of Problem() and Where()
PROJECT & Prj() const
Return a reference to the PROJECT associated with this KIWAY.
void Add(const wxString &aRef, const wxString &aFpSchName, const wxString &aFpCmpName)
Add a line to the selection list.
void ListSet(const wxString &aList)
Add a list of items.
const wxString & GetReference() const
void SetStatusText(const wxString &aText, int aNumber=0) override
const UTF8 & GetLibNickname() const
Return the logical library name portion of a LIB_ID.
void BuildFOOTPRINTS_LISTBOX()
void MessageSet(const wxString &message)
Add a message (in bold) to message list.
bool Show(bool show) override
COMPONENT is used to store components and all of their related information found in a netlist.
virtual FP_LIB_TABLE * PcbFootprintLibs(KIWAY &aKiway)
Return the table of footprint libraries.
int SetLibNickname(const UTF8 &aNickname)
Override the logical library name portion of the LIB_ID to aNickname.
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
COMPONENT * GetComponent(unsigned aIndex)
Function GetComponent returns the COMPONENT at aIndex.
bool ReadNetListAndFpFiles(const std::string &aNetlist)
Function ReadNetListAndFpFiles loads the netlist file built on the fly by Eeschema and loads footprin...
int GetSelection(const wxString &aReference)
void BuildLIBRARY_LISTBOX()
bool IsEmpty() const
Function IsEmpty()
const wxString & GetValue() const
std::string::size_type size() const
Hold an error message and may be used when throwing exceptions containing meaningful error messages.
bool IsOK(wxWindow *aParent, const wxString &aMessage)
Display a yes/no dialog with aMessage and returns the user response.
void DisplayStatus()
Function DisplayStatus updates the information displayed on the status bar at bottom of the main fram...
std::vector< wxString > GetLogicalLibs()
Return the logical library names, all of them that are pertinent to a look up done on this LIB_TABLE.
bool SaveFootprintAssociation(bool doSaveSchematic)
Function SaveFootprintAssociation saves the edits that the user has done by sending them back to eesc...