KiCad PCB EDA Suite
reannotate.cpp File Reference
#include <sch_edit_frame.h>
#include <tools/backannotate.h>
#include <reannotate.h>

Go to the source code of this file.


void ReannotateFromPCBNew (SCH_EDIT_FRAME *aFrame, std::string &aNetlist)

Function Documentation

◆ ReannotateFromPCBNew()

void ReannotateFromPCBNew ( SCH_EDIT_FRAME aFrame,
std::string &  aNetlist 

Definition at line 58 of file reannotate.cpp.

59 {
60  wxString annotateerrors;
63  BACK_ANNOTATE backAnno( aFrame,
64  reporter,
65  false, // aRelinkFootprints
66  false, // aProcessFootprints
67  false, // aProcessValues
68  true, // aProcessReferences
69  false, // aProcessNetNames
70  false ); // aDryRun
72  // TODO (WS): This is completely broken. BackAnnotate symbols never fails so the attempt
73  // to pass information back through the Kiway payload to Pcbnew never happens.
74  // Attempting to pass information back through the Kiway payload in and of
75  // itself is broken because Kiway payloads were never intended to be bidirectional.
76  if( !backAnno.BackAnnotateSymbols( aNetlist ) )
77  {
78  aNetlist = _( "Errors reported by Eeschema:\n" ) + reporter.m_string.ToStdString();
79  aNetlist += _( "\nAnnotation not performed!\n" ); // Assume the worst
80  }
81  else
82  {
83  aNetlist.clear(); //Empty means good
84  }
87  aFrame->SetSheetNumberAndCount();
88  aFrame->SyncView();
89  aFrame->OnModify();
90  aFrame->GetCanvas()->Refresh();
91 }
void UpdateAllScreenReferences()
Update all the symbol references for this sheet path.
void SyncView()
Mark all items for refresh.
SCH_DRAW_PANEL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
A wrapper for reporting to a wxString object.Backannotate the schematic with a netlist sent from Pcbn...
Definition: reannotate.h:32
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=NULL) override
Update the board display after modifying it by a python script (note: it is automatically called by a...
void SetSheetNumberAndCount()
Set the m_ScreenNumber and m_NumberOfScreens members for screens.
#define _(s)
Definition: 3d_actions.cpp:33
Back annotation algorithm class used to receive, check, and apply a NETLIST from Pcbnew.
Definition: backannotate.h:55
SCH_SHEET_PATH & GetCurrentSheet() const
void OnModify() override
Must be called after a schematic change in order to set the "modify" flag of the current screen and u...

References _, BACK_ANNOTATE::BackAnnotateSymbols(), SCH_BASE_FRAME::GetCanvas(), SCH_EDIT_FRAME::GetCurrentSheet(), WX_STRING_REPORTER_FILTERED::m_string, SCH_EDIT_FRAME::OnModify(), EDA_DRAW_PANEL_GAL::Refresh(), RPT_SEVERITY_ERROR, SCH_EDIT_FRAME::SetSheetNumberAndCount(), SCH_BASE_FRAME::SyncView(), and SCH_SHEET_PATH::UpdateAllScreenReferences().

Referenced by SCH_EDIT_FRAME::KiwayMailIn().