diff --git a/pcbnew/swig/pcbnew_scripting_helpers.cpp b/pcbnew/swig/pcbnew_scripting_helpers.cpp index c64ccef1b4..4aba510723 100644 --- a/pcbnew/swig/pcbnew_scripting_helpers.cpp +++ b/pcbnew/swig/pcbnew_scripting_helpers.cpp @@ -152,6 +152,17 @@ BOARD* LoadBoard( wxString& aFileName, IO_MGR::PCB_FILE_T aFormat ) BOARD_DESIGN_SETTINGS& bds = brd->GetDesignSettings(); bds.m_DRCEngine = std::make_shared( brd, &bds ); + try + { + wxFileName rules = pro; + rules.SetExt( DesignRulesFileExtension ); + bds.m_DRCEngine->InitEngine( rules ); + } + catch( ... ) + { + // Best efforts... + } + for( MARKER_PCB* marker : brd->ResolveDRCExclusions() ) brd->Add( marker );