--- /dev/null
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2014 - Scilab Enterprises - Clement David
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+loadXcosLibs();
+// sub-objects not mapped to the model
+o = scicos_graphics()
+o =
+orig = [0,0]
+sz = [20,20]
+flip = %t
+theta = 0
+exprs = []
+pin = []
+pout = []
+pein = []
+peout = []
+gr_i = []
+id = ""
+in_implicit = []
+out_implicit = []
+in_style = []
+out_style = []
+in_label = []
+out_label = []
+style = ""
+o = scicos_model()
+o =
+ type: 0
+in = []
+in2 = []
+intyp = []
+out = []
+out2 = []
+outtyp = []
+evtin = []
+evtout = []
+state = []
+dstate = []
+odstate = list()
+rpar = []
+ipar = []
+opar = list()
+blocktype = "c"
+firing = []
+dep_ut = [%f,%f]
+label = ""
+nzcross = 0
+nmode = 0
+equations = list()
+uid = ""
+// model objects
+// allocate an Annotation
+o = TEXT_f("define");
+clear o;
+// allocate a Block
+o = scicos_block()
+o =
+GUI :
+Graphics:
+ orig = [0,0]
+ sz = [20,20]
+ flip = %t
+ theta = 0
+ exprs = []
+ pin = []
+ pout = []
+ pein = []
+ peout = []
+ gr_i = []
+ id = ""
+ in_implicit = []
+ out_implicit = []
+ in_style = ""
+ out_style = ""
+ in_label = ""
+ out_label = ""
+ style = ""
+Model :
+ type: 0
+ in = []
+ in2 = []
+ intyp = 1
+ out = []
+ out2 = []
+ outtyp = 1
+ evtin = []
+ evtout = []
+ state = []
+ dstate = []
+ odstate = list()
+ rpar = []
+ ipar = []
+ opar = list()
+ blocktype = "c"
+ firing = []
+ dep_ut = [%f,%f]
+ label = ""
+ nzcross = 0
+ nmode = 0
+ equations = list()
+ uid = ""
+clear o;
+// allocate a Link
+o = scicos_link()
+o =
+Link :
+ xx: []
+ yy: []
+ id:
+ thick: 0 0
+ ct: 1 1
+ from: 0 0 0
+ to: 0 0 1
+clear o;
+// allocate a Diagram
+scs_m = scicos_diagram()
+scs_m =
+wpar = [600,450,0,0,600,450]
+title = ["Untitled";""]
+tol = [0.000001,0.000001,1.000D-10,100001,0,1,0]
+tf = 100000
+context = []
+void1 = []
+options = tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(%t,33),[8,1],[1,5],list([4,1,10,1],[4,1,2,1]),[0.8,0.8,0.8])
+void2 = []
+void3 = []
+doc = list()
+// allocate a specific block
+blk = BIGSOM_f("define");
+// manipulate a field
+model = blk.model;
+model.in = [1 1 1 1]';
+blk.model = model;
+// add a block to a diagram
+scs_m.objs(1) = blk;
+// add another block to a diagram (have to perform a copy)
+scs_m.objs($+1) = blk;
+// add a link to connect blocks
+scs_m.objs($+1) = scicos_link();
+lnk = scs_m.objs($);
+lnk.from = [1 1 0]
+lnk =
+Link :
+ xx: []
+ yy: []
+ id:
+ thick: 0 0
+ ct: 1 1
+ from: 1 1 0
+ to: 0 0 1
+lnk.to = [2 1 1]
+lnk =
+Link :
+ xx: []
+ yy: []
+ id:
+ thick: 0 0
+ ct: 1 1
+ from: 1 1 0
+ to: 2 1 1
+scs_m.objs($+1) = lnk;