EbsOpen Class Library for EBSILON®Professional

Application Class

Class representing a loaded EBSILON®Professional instance (for both in-proc and out-of-proc versions)

For a list of all members of this type, see Application Members.

System.Object
   EbsOpen.Application

[Visual Basic]
Public Class Application
[C#]
public class Application
[C++]
public __gc class Application
[JScript]
public class Application

Remarks

The Application class is the base entry-point to EbsOpen when instanciated by the COM environment.

It represents a loaded EBSILON®Professional instance, i.e. an EBSILON®Professional process if EbsOpen.Application is instanciated or a loaded EBSILON®Professional dll if EbsOpen.Dll is instanciated.

Note    Instanciting EbsOpen.Dll return an interface of type EbsOpen.Application. The properties IsProcess and IsDll indicate, which type got instanciated.

It can e.g. be used to

Furthermore, this class has additional helper functions/properties for

Example

Here is a basic example that shows the following tasks:

  1. Creating an instance of EbsOpen.Application
  2. Loading an existing EBSILON®Professional model
  3. Creating a new Sub-Profile in the model
  4. Setting input values in the model
  5. Exectuting simulations
  6. Reading result values from the model
[VBA]

Sub Variation()

    Dim app As EbsOpen.Application
    
    ' create an instance of EbsOpen.Application
    Set app = New EbsOpen.Application
    
    Dim model As EbsOpen.model
    
    Dim Path As String
    Path = "C:\Progam Files\Ebsilon\Data\Examples\Block750.ebs"
    
    ' open model
    Set model = app.Open(Path, True)

    If model Is Nothing Then
        MsgBox (Path & " could not be opened! (Please check and adjust)")
        Exit Sub
    End If

    ' create new sub-profile for variation and activate it
    Dim prof As EbsOpen.Profile
    Set prof = model.RootProfile.NewChild
    prof.Activate

    Dim dsp As EbsOpen.Comp46
    Set dsp = model.Objects.Item("DSP")
    
    Dim elektric_line As EbsOpen.Pipe
    Set elektric_line = model.Objects.Item("Elektro_leitung")
    
    Dim Efficiency_meter As EbsOpen.Comp32
    Set Efficiency_meter = model.Objects.Item("Efficiency_meter")
    
    
    Dim i As Integer
    For i = 400 To 600 Steap 10
        ' set input for value DSP.MEASM (life-steam mass-flow in kg/s)
        dsp.MEASM = i
        
        ' execute a simulation
        model.Simulate
        
        ' output results
        MsgBox ("life-steam mass-flow of " & i & "kg/s results in " & elektric_line.Q / 1000 & " MW net power with an efficiency of " & Efficiency_meter.ETA * 100 & "%")
    Next
End Sub    
                        

Requirements

Namespace: EbsOpen

Assembly: EbsOpen (in ebs2000.exe)

See Also

Application Members | EbsOpen Namespace