# Modtool noblock and xml files and grc

**URL:** <https://www.ruby-forum.com/t/modtool-noblock-and-xml-files-and-grc/242117>\
**Category:** GNU Radio\
**Created:** [May 28, 2015, 5:27pm UTC](https://www.ruby-forum.com/t/modtool-noblock-and-xml-files-and-grc/242117 "2015-05-28T17:27:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Detlef\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Post date:** [May 28, 2015, 5:27pm UTC](https://www.ruby-forum.com/t/modtool-noblock-and-xml-files-and-grc/242117/1 "2015-05-28T17:27:10Z")

</div>

Hello again,

I tried to add a C++ noblock to my OOT module. In this particular case I  
wanted to provide a reusable “n of m” counter class (for non-signal  
stuff  
to count) in C++ code that I could use within various C++ blocks in the  
module. And I did not know of a better way to manage that with the ins  
and  
outs of the gnuradio OOT module make system.

Anyhow, it unexpectedly generated an xml file to import the non-block  
into  
GRC.  
Is there a best way to just remove that xml file without causing other  
issues?

Also when I tried to drag and drop the non-block into GRC, presumably  
from  
the default created xml file with no edits (curiosity always gets one in  
trouble?) GRC went to a blank screen. Of course I was able to close and  
restart and pick up at the last save which was fine. Okay none of that  
is  
really unexpected.

I guess there must be a reason you would have a noblock that can be  
added  
to a flowgraph? But if I do not want anyone to accidentally drag my  
class  
onto the flowgraph how would I best just remove the GRC interface  
without  
breaking everything?

Am I even using the modtool noblock in an intended fashion?

Many thanks as always folks,

- John

---

<div class="post-metadata">

**Author:** ![jmaenpaa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9de053/32.png) [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Post date:** [May 29, 2015, 11:27am UTC](https://www.ruby-forum.com/t/modtool-noblock-and-xml-files-and-grc/242117/2 "2015-05-29T11:27:47Z")

</div>

Nevermind, figured out (by looking at another module, fortunately had  
one  
handy although one could probably find such on git somewhere now that I  
think about it instead of hitting the panic button)  
for posterity, you just have to add the following to the end of the line  
listing the last xml file  
DESTINATION share/gnuradio/grc/blocks

Thanks,  
all that worked great now.

On Thu, May 28, 2015 at 12:17 PM, John M. \<  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)\> wrote:

> Okay.  
> Tried this, then deleted the xml file before attempting to make again  
> without it.  
> Got the following error when re-making (the line with the xml file had a  
> destination which I had thought was just for that file)  
> See also  
> “/usr/local/share/gnuradio-OutOfTree-modules/gr-comso/build/CMakeFiles/CMakeOutput.log”.  
> See also  
> “/usr/local/share/gnuradio-OutOfTree-modules/gr-comso/build/CMakeFiles/CMakeError.log”.
> 
> > > Anyhow, it unexpectedly generated an xml file to import the non-block  
> > > into  
> > > GRC.  
> > > Is there a best way to just remove that xml file without causing other  
> > > issues?
> > 
> > First, do a ‘make uninstall’ from your build directory, to remove the  
> > file  
> > from where GRC finds it.
> > 
> > Then, edit grc/CMakeLists.txt and remove the line that has the XML  
> > filename  
> > in it.
> > 
> > Finally, rerun the build (cmake, make, sudo make install, etc.).
> > 
> > Also when I tried to drag and drop the non-block into GRC, presumably  
> > from
> > 
> > > the default created xml file with no edits (curiosity always gets one  
> > > in  
> > > trouble?) GRC went to a blank screen. Of course I was able to close  
> > > and  
> > > restart and pick up at the last save which was fine. Okay none of  
> > > that is  
> > > really unexpected.
> > 
> > In general, gr\_modtool creates XML files that need further editing  
> > before  
> > being usable in GRC; in this case, GRC didn’t handle the mis-parse very  
> > well.
> > 
> > > I guess there must be a reason you would have a noblock that can be  
> > > added  
> > > to a flowgraph?
> > 
> > You can create generic functions with parameters that you can set up as  
> > variables in GRC. They aren’t blocks added to the flowgraph but are  
> > still
