<br><font size=2 face="sans-serif">Hello,</font>
<br>
<br>
<br><font size=2 face="sans-serif">I'm trying to create palette with programming
block in Xcos. My block codes are working great with scicos but I don't
understand how I can display my block under Xcos.</font>
<br><font size=2 face="sans-serif">I created a .h5 file with the code below
and I wondering what to do next to get it in Xcos...</font>
<br>
<br><font size=2 face="sans-serif">Can you send me an example of script
for block loading? </font>
<br>
<br><font size=2 face="sans-serif">Thank you very much,</font>
<br>
<br><font size=2 face="sans-serif">Charles</font>
<br>
<br>
<br>
<br>
<br><font size=2 face="sans-serif">______________________________________________________________________________________________________________________________________________________</font>
<br><font size=2 face="Courier New">loadScicosLibs;</font>
<br>
<br><font size=2 face="Courier New">function [status, msg] = xcosPalExport(pal,
path)</font>
<br><font size=2 face="Courier New">    status = %t;</font>
<br><font size=2 face="Courier New">    msg = "";</font>
<br><font size=2 face="Courier New">    disp("export to
" + path);</font>
<br><font size=2 face="Courier New">endfunction</font>
<br>
<br><font size=2 face="Courier New">function xcosPalLoad(pal, category)</font>
<br><font size=2 face="Courier New">    if typeof(pal) <>
"string" then pause, end</font>
<br><font size=2 face="Courier New">    if size(pal, '*') <>
1 then pause, end</font>
<br><font size=2 face="Courier New">    if typeof(category) <>
"string" then pause, end</font>
<br><font size=2 face="Courier New">    if and([size(category,
'r') > 1, size(category, 'c') > 1]) then pause, end</font>
<br><font size=2 face="Courier New">endfunction</font>
<br>
<br><font size=2 face="Courier New">Mydir = "C:/";//My Current
directory;</font>
<br><font size=2 face="Courier New">chdir(Mydir);</font>
<br><font size=2 face="Courier New">exec("PPRICE_DIFF.sci");</font>
<br>
<br><font size=2 face="Courier New">pal = xcosPal("Test");</font>
<br><font size=2 face="Courier New">sumPath = Mydir + "/palette.h5";</font>
<br><font size=2 face="Courier New">scs_m = PPRICE_DIFF("define");</font>
<br><font size=2 face="Courier New">export_to_hdf5(sumPath, "scs_m");</font>
<br><font size=2 face="Courier New">pal = xcosPalAddBlock(pal, "PPRICE_DIFF",
[]);</font>
<br>
<br><font size=2 face="Courier New">xcosPalAdd(pal, "My Block Test")</font>
<br><font size=2 face="sans-serif">______________________________________________________________________________________________________________________________________________________</font><br><br>
<P align=left><FONT face=Arial color=#ff0080 size=1><STRONG></STRONG></FONT> </P>
<P align=left><FONT face=Arial color=#ff0080 size=1><STRONG>Attention: </STRONG></FONT></P>
<P align=left><FONT face=Arial color=#400080 size=1>L'integrite de ce message n'etant pas assuree sur Internet, les societes du </FONT><A href="http://www.oddo.fr/"><FONT face=Arial color=#400080 size=1>groupe ODDO</FONT></A> <FONT face=Arial color=#400080 size=1>ne peuvent etre tenues responsables de son contenu. Ce message et les eventuels fichiers attaches contiennent des informations confidentielles. Au cas ou il ne vous serait pas destine, nous vous remercions de bien vouloir le supprimer et en aviser l'expediteur.</FONT> 
<P align=left><FONT color=#400080 size=1>This message and the files that may be attached to it contain confidential information. The <A href="http://www.oddo.fr/"><FONT face=Arial color=#400080 size=1>ODDO group </FONT></A><FONT face=Arial color=#400080 size=1>may not be held responsible for their contents, whose accuracy and completeness cannot be guaranteed over the internet. If the message is not addressed to you, kindly delete it and notify the sender.</FONT></FONT></P>