Xcos doc: add xcosDiagramToScilab (and the NWNI version)
[scilab.git] / scilab / modules / xcos / help / en_US / scilab_utilities_functions / xcosDiagramToScilab.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4  * Copyright (C) 2016-2016 - Scilab Enterprises - Clement DAVID
5  *
6  * Copyright (C) 2016 - 2016 - Scilab Enterprises
7  *
8  * This file is hereby licensed under the terms of the GNU GPL v2.0,
9  * pursuant to article 5.3.4 of the CeCILL v.2.1.
10  * This file was originally licensed under the terms of the CeCILL v2.1,
11  * and continues to be available under such terms.
12  * For more information, see the COPYING file which you should have received
13  * along with this program.
14  *
15  -->
16 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns3="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="xcosDiagramToScilab">
17     <refnamediv>
18         <refname>xcosDiagramToScilab</refname>
19         <refpurpose>Load or Save an Xcos diagram</refpurpose>
20     </refnamediv>
21     <refsynopsisdiv>
22         <title>Syntax</title>
23         <synopsis>scs_m = xcosDiagramToScilab(filename)</synopsis>
24         <synopsis>[scs_m1, scs_m2, ...] = xcosDiagramToScilab([filename1, filename2, ...])</synopsis>
25         <synopsis/>
26         <synopsis>xcosDiagramToScilab(filename, scs_m)</synopsis>
27         <synopsis>xcosDiagramToScilab([filename1, filename2, ...], scs_m1, scs_m2)</synopsis>
28     </refsynopsisdiv>
29     <refsection id="Module_xcosDiagramToScilab">
30         <title>Module</title>
31         <itemizedlist>
32             <listitem>
33                 <para>
34                     <link linkend="xcos">xcos</link>
35                 </para>
36             </listitem>
37         </itemizedlist>
38     </refsection>
39     <refsection id="Parameters_xcosDiagramToScilab">
40         <title>Arguments</title>
41         <itemizedlist>
42             <listitem>
43                 <para>
44                     <emphasis role="bold">scs_m</emphasis>: The <link linkend="scicos_diagram">scicos_diagram</link> data structure.
45                 </para>
46             </listitem>
47             <listitem>
48                 <para>
49                     <emphasis role="bold">filename</emphasis>: The Xcos file to
50                     load.
51                 </para>
52             </listitem>
53         </itemizedlist>
54     </refsection>
55     <refsection id="Description_xcosDiagramToScilab">
56         <title>Description</title>
57         <para>Used to load and save a diagram in scripts.</para>
58         <para>
59             To load some files into Scilab as an <link linkend="scicos_diagram">scicos_diagram</link> data structure, use one or multiple output variables. The variable can then be manipulated in Scilab to launch a simulation, update context, settings or blocks.
60         </para>
61         <para>
62             To save a file from Scilab, pass some <link linkend="scicos_diagram">scicos_diagram</link> data structures as input parameters. The output file format is selected accordingly to the files extension.
63         </para>
64     </refsection>
65     <refsection>
66         <title>Examples</title>
67         <programlisting role="example">
68             filename=SCI+"/modules/xcos/demos/demo_Datatype.zcos";
69             scs_m=xcosDiagramToScilab(filename),
70         </programlisting>
71     </refsection>
72     <refsection id="SeeAlso_xcosDiagramToScilab">
73         <title role="see also">See also</title>
74         <itemizedlist>
75             <listitem>
76                 <link linkend="scicos_diagram">scicos_diagram</link>
77             </listitem>
78             <listitem>
79                 <link linkend="xcos">xcos</link>
80             </listitem>
81             <listitem>
82                 <link linkend="importXcosDiagram">importXcosDiagram</link>
83             </listitem>
84         </itemizedlist>
85     </refsection>
86 </refentry>