Based on that, I managed to do a rude hack with the XML file and an embedded python module.
It works, but it just doesn't feel right :)
What I try to achieve; control an external radio via TCP commands based on the frequency (or other) variable in the flowgraph.
So I will investigate an OOT python block based on messages, sounds really more reasonable.
Which GUI blocks can send messages?
PS:
Yes, I struggled with GRC's real name. I use an alias "grc", and was not sure if everybody knows what I mean.
And then typos...
Message: 5Date: Mon, 14 Aug 2017 22:27:52 +0200From: Marcus M?ller <address@hidden>To: <address@hidden>Subject: Re: [Discuss-gnuradio] How to add code to a gnuradio_companion variable setterMessage-ID: <address@hidden>Content-Type: text/plain; charset="utf-8"; format=flowedHi kai,short version:1. make an out-of-tree module2. add new block ? python or cpp, doesn't matter, should be of type "noblock" if you really just want to do anything.3. modify the XML file describing that block for the GNU Radio Companion, so that it has a parameter with a <callback>methodname($parametername)</callback> field.4. do what you want in yourblock.methodname(parameter)5. build and install that moduleYou'll find an intro on how to use gr_modtool to generate out-of-tree modules in the "Guided Tutorials" on http://tutorials.gnuradio.org .BUT: I **Really** would discourage trying to do what you're doing. Use message passing instead. What is it that you want to build? I'm almost certain what you're trying to achieve can be done in different, less "complicated" manners.Best regards,MarcusPS: we say "GRC" or "GNU Radio companion", because it's the "graphical companion to GNU Radio"; "gnu radio_companion" just seems wrong :)