33#include <wx/filedlg.h>
39 FILE* cmpFile = wxFopen( aFullCmpFileName, wxT(
"wt" ) );
41 if( cmpFile ==
nullptr )
48 fprintf( cmpFile,
"\nBeginCmp\n" );
49 fprintf( cmpFile,
"TimeStamp = %s\n",
TO_UTF8( fp->m_Uuid.AsString() ) );
50 fprintf( cmpFile,
"Path = %s\n",
TO_UTF8( fp->GetPath().AsString() ) );
51 fprintf( cmpFile,
"Reference = %s;\n",
52 !fp->GetReference().IsEmpty() ?
TO_UTF8( fp->GetReference() ) :
"[NoRef]" );
53 fprintf( cmpFile,
"ValeurCmp = %s;\n",
54 !fp->GetValue().IsEmpty() ?
TO_UTF8( fp->GetValue() ) :
"[NoVal]" );
55 fprintf( cmpFile,
"IdModule = %s;\n", fp->GetFPID().Format().c_str() );
56 fprintf( cmpFile,
"EndCmp\n" );
59 fprintf( cmpFile,
"\nEndListe\n" );
75 wxFileDialog dlg(
m_frame,
_(
"Save Footprint Association File" ), projectDir, fn.GetFullName(),
77 wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
79 if( dlg.ShowModal() == wxID_CANCEL )
82 wxString
path = dlg.GetPath();
int ExportCmpFile(const TOOL_EVENT &aEvent)
Information pertinent to a Pcbnew printed circuit board.
const FOOTPRINTS & Footprints() const
const wxString & GetFileName() const
PROJECT & Prj() const
Return a reference to the PROJECT associated with this KIWAY.
virtual const wxString GetProjectFullName() const
Return the full path and name of the project.
void DisplayError(wxWindow *aParent, const wxString &aText)
Display an error or warning message box with aMessage.
This file is part of the common library.
static const std::string FootprintAssignmentFileExtension
static wxString FootprintAssignmentFileWildcard()
This file contains miscellaneous commonly used macros and functions.
wxString GetISO8601CurrentDateTime()
#define TO_UTF8(wxstring)
Convert a wxString to a UTF8 encoded C string for all wxWidgets build modes.
Definition of file extensions used in Kicad.