diff --git a/eeschema/netform.cpp b/eeschema/netform.cpp index a87dec87f3..d184e71803 100644 --- a/eeschema/netform.cpp +++ b/eeschema/netform.cpp @@ -47,6 +47,7 @@ #include // also nests: #include #include +#include #define INTERMEDIATE_NETLIST_EXT wxT("xml") @@ -652,16 +653,35 @@ static XNODE* node( const wxString& aName, const wxString& aTextualContent = wxE XNODE* NETLIST_EXPORT_TOOL::makeGenericDesignHeader() { + SCH_SCREEN* screen; + SCH_SCREENS ScreenList; + screen = ScreenList.GetFirst(); XNODE* xdesign = node( wxT("design") ); // the root sheet is a special sheet, call it source xdesign->AddChild( node( wxT( "source" ), g_RootSheet->GetScreen()->GetFileName() ) ); - xdesign->AddChild( node( wxT( "date" ), DateAndTime() ) ); + xdesign->AddChild( node( wxT( "generatedDate" ), DateAndTime() ) ); // which Eeschema tool xdesign->AddChild( node( wxT( "tool" ), wxT( "Eeschema " ) + GetBuildVersion() ) ); + // export project information + if( screen != NULL ) + { + + TITLE_BLOCK tb2 = screen->GetTitleBlock(); + + xdesign->AddChild( node( wxT( "title" ), tb2.GetTitle() )); + xdesign->AddChild( node( wxT( "company" ), tb2.GetCompany())); + xdesign->AddChild( node( wxT( "revision" ), tb2.GetRevision())); + xdesign->AddChild( node( wxT( "issueDate" ), tb2.GetDate())); + xdesign->AddChild( node( wxT( "comment1" ), tb2.GetComment1())); + xdesign->AddChild( node( wxT( "comment2" ), tb2.GetComment2())); + xdesign->AddChild( node( wxT( "comment3" ), tb2.GetComment3())); + xdesign->AddChild( node( wxT( "comment4" ), tb2.GetComment4())); + } + /* @todo might do a list of schematic pages diff --git a/eeschema/plugins/bom2csv.xsl b/eeschema/plugins/bom2csv.xsl index 1991d4953e..0e58462b05 100644 --- a/eeschema/plugins/bom2csv.xsl +++ b/eeschema/plugins/bom2csv.xsl @@ -4,11 +4,8 @@ Functionality: Generation of csv table with table head of all existing field names - and correct assigned cell entries + and correct assigned cell entries. - How to use this is explained in eeschema.pdf chapter 14. You enter a command line into the - netlist exporter using a new (custom) tab in the netlist export dialog. The command is - similar to on Windows: xsltproc -o "%O.csv" "C:\Program Files (x86)\KiCad\bin\plugins\bom2csv.xsl" "%I" on Linux: @@ -21,10 +18,22 @@ - Reference, Value, Footprint, Datasheet + + Source: &nl; + Kicad Rev: &nl; + Generated Date: &nl; + &nl; + Document Title: &nl; + Company: &nl; + Revision: &nl; + Issue Date: &nl; - - - , - - - &nl; + + + Comment: &nl; + + + + + + Comment: &nl; + + + + + + Comment: &nl; + + + + + + Comment: &nl; + + + + &nl; + + + Reference, Value, + + + , + + Library, Library Ref + &nl; @@ -57,12 +102,17 @@ , , - , - + &nl; + + + , + + + @@ -72,7 +122,6 @@ - , @@ -87,6 +136,7 @@ Every non-blank entry is assigned to its proper column. --> + ,