[Scilab-users] Reading an xcos diagram with scs_m

Nazreen mohammednazreen at live.com
Fri Nov 13 14:39:19 CET 2015


Dear Sir,
             I use the uigetfile function to get the file directory and open
the xcos files, as shown below.
<http://mailinglists.scilab.org/file/n4033086/Capture1.jpg>             

My application currently functions as follows:
datafilex= uigetfile(["*.zcos|*.xcos*"],toolbox_dir + "/Diagram Files/",
"Select diagram file of power system");

If retrieving the scs_m for the "four bus system" diagram, the instructions
that would execute are:
datafilex="C:\Users\Mohammed\Documents\PROJECT\SCIPOWER\Diagram Files\four
bus system.zcos"
importXcosDiagram(datafilex);

If retrieving the scs_m for the "five bus system" diagram, the instructions
that would execute are:
datafilex="C:\Users\Mohammed\Documents\PROJECT\SCIPOWER\Diagram Files\five
bus system.xcos"
importXcosDiagram(datafilex);

Data is then extracted from scs_m.objs and sent to a csv file. The Solver
block (when clicked on), reads the data from the csv file and then displays
a scilab choose message. After an option is selected, it performs the
calculations and displays the result on the console, as seen below.
<http://mailinglists.scilab.org/file/n4033086/Capture2.jpg> 

Instead, how can I automatically generate the desired file directory in the
Solver xcos block when it is clicked on? The Solver block ("Solve Power
Flow") currently works as seen above, but I have to specify the file
directory using uigetfile. 

Thus, how can I change this and get the importXcosDiagram(datafilex) to be
generated when many xcos files are opened through the Solver block without
using uigetfile. Can a Solver block tell which file is currently in use when
the Solver block in that file is clicked on (e.g. distinguish if four bus or
five system is selected)?

Regards,
Nazreen.



--
View this message in context: http://mailinglists.scilab.org/Scilab-users-Reading-an-xcos-diagram-with-scs-m-tp4032802p4033086.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.



More information about the users mailing list