diff --git a/eeschema/netform.cpp b/eeschema/netform.cpp index 40796e0e06..5ca5fb2836 100644 --- a/eeschema/netform.cpp +++ b/eeschema/netform.cpp @@ -654,32 +654,37 @@ static XNODE* node( const wxString& aName, const wxString& aTextualContent = wxE XNODE* NETLIST_EXPORT_TOOL::makeGenericDesignHeader() { SCH_SCREEN* screen; - SCH_SCREENS ScreenList; - screen = ScreenList.GetFirst(); + SCH_SCREENS screenList; + screen = screenList.GetFirst(); XNODE* xdesign = node( wxT("design") ); + XNODE* xsheetNode; + XNODE* xsheetInfo; // the root sheet is a special sheet, call it source xdesign->AddChild( node( wxT( "source" ), g_RootSheet->GetScreen()->GetFileName() ) ); - xdesign->AddChild( node( wxT( "generatedDate" ), DateAndTime() ) ); + xdesign->AddChild( node( wxT( "date" ), DateAndTime() ) ); // which Eeschema tool xdesign->AddChild( node( wxT( "tool" ), wxT( "Eeschema " ) + GetBuildVersion() ) ); - // export project information - if( screen != NULL ) - { + xdesign->AddChild( xsheetNode = node( wxT( "sheets" ) ) ); + for( screen = screenList.GetFirst(); screen != NULL; screen = screenList.GetNext() ) + { + TITLE_BLOCK tb = screen->GetTitleBlock(); - xdesign->AddChild( node( wxT( "title" ), tb.GetTitle() ) ); - xdesign->AddChild( node( wxT( "company" ), tb.GetCompany() ) ); - xdesign->AddChild( node( wxT( "revision" ), tb.GetRevision() ) ); - xdesign->AddChild( node( wxT( "issueDate" ), tb.GetDate() ) ); - xdesign->AddChild( node( wxT( "comment1" ), tb.GetComment1() ) ); - xdesign->AddChild( node( wxT( "comment2" ), tb.GetComment2() ) ); - xdesign->AddChild( node( wxT( "comment3" ), tb.GetComment3() ) ); - xdesign->AddChild( node( wxT( "comment4" ), tb.GetComment4() ) ); + xsheetNode->AddChild( xsheetInfo = node( wxT( "sheet" ) ) ); + + xsheetInfo->AddChild( node( wxT( "title" ), tb.GetTitle() ) ); + xsheetInfo->AddChild( node( wxT( "company" ), tb.GetCompany() ) ); + xsheetInfo->AddChild( node( wxT( "revision" ), tb.GetRevision() ) ); + xsheetInfo->AddChild( node( wxT( "issueDate" ), tb.GetDate() ) ); + xsheetInfo->AddChild( node( wxT( "comment1" ), tb.GetComment1() ) ); + xsheetInfo->AddChild( node( wxT( "comment2" ), tb.GetComment2() ) ); + xsheetInfo->AddChild( node( wxT( "comment3" ), tb.GetComment3() ) ); + xsheetInfo->AddChild( node( wxT( "comment4" ), tb.GetComment4() ) ); } /* @todo might do a list of schematic pages diff --git a/eeschema/plugins/bom_with_title_block_2_csv.xsl b/eeschema/plugins/bom_with_title_block_2_csv.xsl index 3e7e848e59..e4583fa063 100644 --- a/eeschema/plugins/bom_with_title_block_2_csv.xsl +++ b/eeschema/plugins/bom_with_title_block_2_csv.xsl @@ -3,7 +3,11 @@ EESCHEMA BOM plugin. Creates BOM CSV files from the project net file. Based on Stefan Helmert bom2csv.xsl - Arthur: Ronald Sousa HashDefineElectronics.com + Note: + The project infomation (i.e title, company and revision) is taken from and the root sheet. + + Arthur: + Ronald Sousa HashDefineElectronics.com Usage: on Windows: @@ -12,16 +16,18 @@ xsltproc -o "%O.csv" /usr/local/lib/kicad/plugins/bom2csv.xsl "%I" Ouput Example: - Kicad Rev: working director and file source - Generated Date: date this file was generated - Document Title: the project tile - Company: the project company - Revision: the project revision - Issue Date: project issue date - Comment: This is comment 1 - Comment: This is comment 2 - Comment: This is comment 3 - Comment: This is comment 4 + Source, + Kicad Rev, working director and file source + Generated Date, date this file was generated + + Title, the project's tile + Company, the project's company + Revision, the project's revision + Date Source, project's issue date + Comment, This is comment 1 + Comment, This is comment 2 + Comment, This is comment 3 + Comment, This is comment 4 Reference, Value, Fields[n], Library, Library Ref U1, PIC32MX, Fields[n], KicadLib, PIC @@ -31,7 +37,6 @@ ]> - @@ -40,55 +45,95 @@ - - Source: &nl; - Kicad Rev: &nl; - Generated Date: &nl; + Source,&nl; + Kicad Rev,&nl; + Generated Date,&nl; + &nl; - Document Title: &nl; - Company: &nl; - Revision: &nl; - Issue Date: &nl; - - - - Comment: &nl; - - - - - - Comment: &nl; - - - - - - Comment: &nl; - - - - - - Comment: &nl; - - - - &nl; - + + + + + &nl; + - Reference, Value, + Reference,Value, - , + , - Library, Library Ref + Library,Library Ref &nl; + + + + + + + Title,&nl; + + + Title,Not Set&nl; + + + + + + + Company,&nl; + + + Company,Not Set&nl; + + + + + + Revision,&nl; + + + Revision,Not Set&nl; + + + + + + Date Issue,&nl; + + + Date Issue,Not Set&nl; + + + + + Comment,&nl; + + + + + + Comment,&nl; + + + + + + Comment,&nl; + + + + + + Comment,&nl; + + + + ,