On 13.05.2016 03:45, Chris Pavlina wrote:
> Hi,
> 
> Excuse my unfamiliarity with the architecture of the PNS router - could 
> someone
> more familiar with it help me out and explain what the preferred way to
> access settings, like PNS_ROUTING_SETTINGS::CanViolateDRC, from contexts
> outside the routing tools is? I need a way to implement things like toolbar
> buttons (currently I'm looking at merging duplicate functionality like
> PNS_ROUTING_SETTINGS::CanViolateDrc and g_Drc_On), and I'm having trouble
> seeing a good way to get the data between the routing context and the GUI
> context.
> 
Hi Chris,

Quick solution:
- retrieve the routing tool:

ROUTER_TOOL* theRouter = static_cast<ROUTER_TOOL*>( m_toolMgr->FindTool(
"pcbnew.InteractiveRouter" ) );


- retrieve the settings object

PNS_ROUTING_SETTINGS& settings = theRouter->PNSSettings();

Cheers,
Tom




_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to     : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp

Reply via email to