EBSILON®Professional Online Documentation
EbsScript / EbsScript Functions / Object Functions
In This Topic
    Object Functions
    In This Topic

    One can see all objects currently available in the model listed in the object tree shown in the EbsScript-Editor (make sure View-Toolbars-Objects is activated). Objects in turn offer particular EbsScript functions which can be invoked only via the object name. An example is the function interpolate for an object of type ebscharline.

     

    Name

    Purpose

    method

    Return value

    Example

    ToArray

    These functions enable a data exchange between characteristic lines or matrices of Ebsilon components and EbsScript arrays.

     

    ar:=ebscomp.ebscharline/ebsmatrix.toarray;

    REAL: ar: array of 
                   real

    var
        ar:array of array[1..2] of real; i,j:integer;
    begin            
         ar:=Air_preheater.CKAM1.toarray;
         for i:=0 to 
         Air_preheater.CKAM1.size-1 do
         begin println (i," ",ar[i][1]," ",ar[i][2]); 
         end;
         Heat_exchanger.CKAM1.fromarray(ar); end.  

    FromArray

    These functions enable a data exchange between EbsScript arrays(ar) and characteristic lines or matrices of Ebsilon components.

    ebscomp.ebscharline/ebsmatrix.toarray(ar);

    REAL: ar: array of 
                   real

    Interpolate
    (for an object of type ebscharline)

    For characteristic lines, it is possible to access the interpolation functions of the component from EbsScript, i.e. to determine the value of the characteristic line at one point.

    y:=ebscomp.ebscharline.interpolate(x: real);

    REAL: y-value
                                  

    var
         x, y: real
    begin

         x:=5000
         y:=Motor.CQ3NCV.interpolate(x)

    end.