EBSILON®Professional Online Documentation
In This Topic
    Display of Objects
    In This Topic

    Display of Objects


    General

    It is possible to customize the display (colour and thickness) of objects as per your requirements. To do this



    Example

    Given below is an example for the implementation of onUpdateObject, through which the colour of the pipeline is changed depending upon the pressure and the thickness of the pipeline is changed depending upon the mass flow:

    procedure onUpdateObject(obj:ebsobject);
    
    var
    pipe:ebspipe;
    mass:real;
    pressure:real;
    width:integer;
    color:integer;
    begin
    
    pipe := ebspipe(obj);
    
    if isKindOf( pipe, "ebspipewater" ) or isKindOf( pipe, "ebspipesteam" ) then
    begin
    pressure:=pipe.p;
    
    if isKindOf( pipe, "ebspipewater" ) then
    begin
    if pressure < 1 then colour := $ffa0a0 else
    
    if pressure < 5 then colour := $ff8080 else
    
    if pressure < 10 then colour := $ff4040 else
    
    if pressure < 40 then colour := $ff0000 else
    
    if pressure < 100 then colour := $d00000 else
    
    colour := $a00000;
    
    end else
    begin
    if pressure < 1 then colour := $a0a0ff else
    
    if pressure < 5 then colour := $8080ff else
    
    if pressure < 10 then colour := $4040ff else
    
    if pressure < 40 then colour := $0000ff else
    
    if pressure < 100 then colour := $0000d0 else
    
    colour := $0000a0;
    
    end;
    
    pipe.color:=colour;
    mass:=pipe.m;
    if mass < 10 then width := 1 else
    
    if mass < 30 then width := 2 else
    
    if mass < 60 then width := 3 else
    
    if mass < 100 then width := 4 else
    
    if mass < 150 then width := 5 else
    
    if mass < 200 then width := 6 else
    
    if mass < 300 then width := 7 else
    
    if mass < 400 then width := 8 else
    
    if mass < 500 then width := 9 else
    
    width := 10;
    
    pipe.width:=width;
    
    end;
    
    end;