From 0bc1c08d4f12a99cef2a9db3cb6f9a477c0fd2dd Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Sun, 1 Sep 2013 12:52:46 -0500 Subject: [PATCH] Add and to generic netlist XML format, required by new bom_csv_grouped_by_value.py support. --- eeschema/netform.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/eeschema/netform.cpp b/eeschema/netform.cpp index fbb16a245b..4cc33547c8 100644 --- a/eeschema/netform.cpp +++ b/eeschema/netform.cpp @@ -714,6 +714,8 @@ XNODE* NETLIST_EXPORT_TOOL::makeGenericLibParts() wxString sLibpart = wxT( "libpart" ); wxString sLib = wxT( "lib" ); wxString sPart = wxT( "part" ); + wxString sAliases = wxT( "aliases" ); + wxString sAlias = wxT( "alias" ); wxString sPins = wxT( "pins" ); // key for library component pins list wxString sPin = wxT( "pin" ); // key for one library component pin descr wxString sPinNum = wxT( "num" ); // key for one library component pin num @@ -744,6 +746,20 @@ XNODE* NETLIST_EXPORT_TOOL::makeGenericLibParts() xlibpart->AddAttribute( sLib, library->GetLogicalName() ); xlibpart->AddAttribute( sPart, lcomp->GetName() ); + if( lcomp->GetAliasCount() ) + { + wxArrayString aliases = lcomp->GetAliasNames( false ); + if( aliases.GetCount() ) + { + XNODE* xaliases = node( sAliases ); + xlibpart->AddChild( xaliases ); + for( unsigned i=0; iAddChild( node( sAlias, aliases[i] ) ); + } + } + } + //----- show the important properties ------------------------- if( !lcomp->GetAlias( 0 )->GetDescription().IsEmpty() ) xlibpart->AddChild( node( sDescr, lcomp->GetAlias( 0 )->GetDescription() ) );