static void Main(string[] args) { if (args.Length > 0) { //Console.WriteLine("Starting OpenDSS..."); filePath = args[0]; resultPath = args[1]; SimpleHTTPServer myServer = new SimpleHTTPServer(filePath, 3001); Console.WriteLine("Server is running on this port: " + myServer.Port.ToString()); try { dss = new DSS(); if (!(dss.Start(0))) { Console.WriteLine("OpenDSS failed to start"); } else { //Console.WriteLine("OpenDSS started successfully"); DSSText = dss.Text; } } catch (Exception e) { Console.WriteLine(e.Message); } } else { Console.WriteLine("Error: DSS file parameter is required (e.g. \"powerflow.exe myfile.dss <result_dir>\")."); } }
private void button1_Click(object sender, EventArgs e) { DSSObj = new DSS(); if (DSSObj.Start(0)) { MessageBox.Show("OpenDSS Started OK"); }; }
private void button1_Click(object sender, EventArgs e) { DSSObj = new DSS(); if (DSSObj.Start(0)) { MessageBox.Show("OpenDSS Started OK"); } ; }
private void starDSS_Click(object sender, EventArgs e) { DSSobj = new DSS(); if (!(DSSobj.Start(0))) { MessageBox.Show("DSS failed to start"); } else { MessageBox.Show("DSS started sucessfully"); DSSText = DSSobj.Text; } }
// inicializa serv DSS private void InicializaServDSS() { //Inicializa o servidor COM _DSSObj = new DSS(); // Inicializa servidor COM _DSSObj.Start(0); // configuracoes gerais OpenDSS _DSSObj.AllowForms = _paramGerais._parGUI._allowForms; // interface texto _DSSText = _DSSObj.Text; }
private void StartButton_Click(object sender, EventArgs e) { DSSObj = new DSS(); if (!(DSSObj.Start(0))) { MessageBox.Show("DSS failed to start"); } else { //Successful start! // MessageBox.Show("DSS started sucessfully"); // set some variables to interfaces to make coding easier DSSText = DSSObj.Text; // Set Variable for accessing the Text interface DSSCircuit = DSSObj.ActiveCircuit; DSSSolution = DSSCircuit.Solution; Form1.ActiveForm.Text = DSSObj.Version; } }
public LoadFlowSolver(StatefulServiceContext context) : base(context) { this.logger = CloudLoggerFactory.GetLogger(ServiceEventSource.Current, context); DSSObject = new DSS(); if (!(DSSObject.Start(0))) { Logger.LogError("DSS failed to start."); return; } else { Logger.LogInformation($"DSS successfully started for partition {Context.PartitionId}."); } DSSCircuit = DSSObject.ActiveCircuit; DSSSolution = DSSCircuit.Solution; }
private void starDSS_Click( object sender, EventArgs e ) { DSSobj = new DSS(); if ( !( DSSobj.Start( 0 ) ) ) { MessageBox.Show( "DSS failed to start" ); } else { MessageBox.Show( "DSS started sucessfully" ); DSSText = DSSobj.Text; } }