<div dir="ltr"><div><div>Umut, <br><br></div>I think model (scs_m) recursive parsing script will be a good starting point for you.  In Arduino Scilab boolbox you can find script that shows how to create diagram with create_xcosdiagram() function - <a href="http://forge.scilab.org/index.php/p/arduino/source/tree/HEAD/macros/ARDUINO_SCOPE.sci">http://forge.scilab.org/index.php/p/arduino/source/tree/HEAD/macros/ARDUINO_SCOPE.sci</a> <br><br><br>function obj=scan_blocks(scs_m)<br>    obj = [];<br>    <br>    for i=1:(size(scs_m.objs)-1)<br>        if typeof(scs_m.objs(i))=="Block" then<br>            if scs_m.objs(i).model.sim=="super"|scs_m.objs(i).model.sim=="csuper" then<br><br>                // if we have superblock make a recurrence call<br>                scs_m.objs(i).model.rpar = scan_blocks(scs_m.objs(i).model.rpar);<br>            else<br></div><br>                // here you can modify your model <br><div>                if scs_m.objs(i).model.sim(1) == "your_block"<br></div><div>                    // do some modifications here<br></div><div>                end<br><br>            end<br>        end<br>    end<br><br>    obj = scs_m;<br>endfunction<br><br></div><div>Regards Grzegorz<br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-01-29 0:01 GMT+01:00 Dr.Umut Durak <span dir="ltr"><<a href="mailto:umut.durak@tu-clausthal.de" target="_blank">umut.durak@tu-clausthal.de</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello open source simulation community,<br>
<br>
I would like to parse, search Xcos models and modify them via deleting, modifying and replacing its elements, namely blocks and lines. While it evident that I need to use the API namely scicos_block, scicos_link, scicos_diagram, etc., help pages and web resources fail to provide any example or so to speak a tutorial about how to use this API. Can anyone help me, and provide some examples about the use of these functions?<br>
<br>
Thanks in advance for your help,<br>
<br>
Umut<br>
______________________________<u></u>_________________<br>
users mailing list<br>
<a href="mailto:users@lists.scilab.org" target="_blank">users@lists.scilab.org</a><br>
<a href="http://lists.scilab.org/mailman/listinfo/users" target="_blank">http://lists.scilab.org/<u></u>mailman/listinfo/users</a><br>
</blockquote></div><br></div>