Xcos programming bloc pb
cguillot at oddo.fr
cguillot at oddo.fr
Fri Aug 6 14:25:03 CEST 2010
Hello,
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.
I created a .h5 file with the code below and I wondering what to do next
to get it in Xcos...
Can you send me an example of script for block loading?
Thank you very much,
Charles
______________________________________________________________________________________________________________________________________________________
loadScicosLibs;
function [status, msg] = xcosPalExport(pal, path)
status = %t;
msg = "";
disp("export to " + path);
endfunction
function xcosPalLoad(pal, category)
if typeof(pal) <> "string" then pause, end
if size(pal, '*') <> 1 then pause, end
if typeof(category) <> "string" then pause, end
if and([size(category, 'r') > 1, size(category, 'c') > 1]) then pause,
end
endfunction
Mydir = "C:/";//My Current directory;
chdir(Mydir);
exec("PPRICE_DIFF.sci");
pal = xcosPal("Test");
sumPath = Mydir + "/palette.h5";
scs_m = PPRICE_DIFF("define");
export_to_hdf5(sumPath, "scs_m");
pal = xcosPalAddBlock(pal, "PPRICE_DIFF", []);
xcosPalAdd(pal, "My Block Test")
______________________________________________________________________________________________________________________________________________________
___________________________________________________________________________
L'integrite de ce message n'etant pas assuree sur Internet, les societes du groupe Oddo ne peuvent ?tre tenues responsables de son contenu. Ce message et les eventuels fichiers attaches contiennent des informations confidentielles. Au cas o? il ne vous serait pas destine, nous vous remercions de bien vouloir le supprimer et en aviser l'expediteur.
This message and the files that may be attached to it contain confidential information. The Oddo group 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.
___________________________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20100806/4b209a6a/attachment.htm>
More information about the users
mailing list