EBSILON®Professional Online Documentation
The Graphical Editor / Edit Objects / Edit text fields
In This Topic
    Edit text fields
    In This Topic

    Edit Text fields


    General

    The chapters listed here provide information about editing the components, which can be used for almost all objects regardless of their type:

       

    Basics

    Each text field can display one or more rows of text.

    The text field comprises of

    You can change all the properties (font, background colour, text to be displayed, position, orientation, &ldots;).


    Insert new text field

    Select a text field to be inserted and proceed as follows:

    The default text is the string ”Text object”.


    Edit text field properties

    You can modify all the properties of a text field (font, background colour, text to be displayed, position, orientation, &ldots;).

    There are several ways to open the "Text Field Properties" window:

    The ”Text Field Properties” window consists of two parts:

    In the left part, the properties of the text field are edited. You can switch here between the tabs ”Text” and ”Format”.

    The right part displays the text as it is placed into the document.

    There are three buttons in the lower part of the window:

    The ”Text” tab is used to specify the text and its basic attributes:

    In the field "Text” you can enter the text comprising of one or more rows.

    Multi-line text input fields can be enlarged by pulling the “grip“ field in the right bottom corner. Double-clicking the field restores the size used last. Moreover, the font and font size can be changed via the context menu; this change will then affect all multi-line text input fields.

    Note that the display of the text in the right field of the property window is updated, when you finish editing and click with the mouse outside the field for entering the text.

    If the checkbox "Use HTML-syntax" is activated, the text entered is interpreted as HTML-code. This provides you with an access to a lot of formatting options, including the use of CSS (Cascading Style Sheets). When interpreting the HTML-code, the Ebsilon-specific language extensions are also available, which, for instance, enable the call of an EbsScript or the activation of the EposProVis-trend curves.

    In the region ”Profile Dependency” you can define whether your text shall be the same in all profiles (default) or whether you like to specify a special text for certain profiles. If you activate ”Text depends on profiles” while you are in the design profile, all profiles will get this text as default. To change it in a sub-profile, deactivate the checkbox ”Text from parent profile” and type your sub-profile text. If you activate checkbox ”Text depends on profile” in a sub-profile, the higher profile in the profile hierarchy will be empty.

    The drop-down box "Profile" enables you to switch between the different profiles without closing the Text Fields properties window.

    Like each EBSILON®Professional- object, text fields have to have a unique name. This can be specified in the ”Name” region and can be used in operation that require the name to access an object.

    In the ”Excel” region, you can decide whether this text field shall be included in the corresponding Excel workbook. If this flag is activated, you can read your text from Excel or write it to Excel.

    In the ”Visibility” region, you can decide whether the text field shall be displayed or not.

    Click on "Evaluate Text (Alt-E)" to make your text changes visible in the preview.

     


    EbsScript expressions in text fields

    The text may contain simple strings, which are displayed as they are, or else can contain expressions, which are evaluated. Such expressions must be written within braces "{ }”.

    Within these brackets, one can use numbers, arithmetic expressions (+,-,*,/), variables (e.g. ComponentName.SpecName or LineName.ValueName or @model.VariableName) and certain string functions (e.g. getFileName ()) and mathematical functions (e.g. log()) and user-defined functions that are included in a Standard-Unit.

    It is even possible to use a format specification within the expression. It must be added to the expression with a semicolon (”;”). The syntax for floating point numbers is ”;%n.mf”, where n is the minimal field width and m is the number of decimal digits.

    The syntax for these expressions is the as the syntax used in EbsScript. An overview of the available functions is given in the EbsScript-Documentation.

    You can also use anonymous functions. An anonymous function is a function without a name, which is called just after its definition.

    An example:

    {uses @fluid;
    function():string
    var fluidData:FluidData;
    begin
        fluidGetAnalysis( NameOfAnOilMeltPipe, fluidData);
        if fluidData.fluidExtension <> nil and fluidData.fluidExtension^.fluidExtensionType = fluidExtensionTypeThermoLiquid then
            result:=enumtostring(fluidData.fluidExtension^.fluidExtensionThermoLiquid.thermoLiquidType)
        else
            result:="no thermo-liquid defined";

    end();}

    This example can also be used with the text field of a value cross of type Text-Field connected to a pipe. "NameOfAnOilMeltPipe" can be replaced by $. $ is a link to the object the value cross is connected to.

     


    Format options for text fields

    The ”Format” tab is used to apply certain graphical attributes to the text field:

     

    In the ”Format” region you can select the font (including the size of the letters), the type of alignment and the mode of auto-scale.

    The alignment of the text to the surrounding box can be defined vertically and horizontally:

    In the vertical direction, there are these three choices:

    In the horizontal direction , there are these three choices:

    Similarly, there are three options for the auto-scale mode:

    The auto-scaling is especially helpful, if you use profile-dependent texts, where the text length may vary. Depending on your drawing, your may prefer a constant size of your text block or a constant font size.

    The ”Outline” region allows to specify the frame around the text field. If there is a frame, you can select the style, the colour and the line thickness.

    The ”Fill” region allows to specify the style and the colour of the background of the text field. You can also specify the background as ”None”. In this case, the text field will be transparent.

    For all four directions (top, bottom, right and left), a distance can be specified in logical points to the outer boundary. This makes it possible, for example, to check the distance between the text and the frame in a framed text field.

    Editable text fields (input fields)

    It is possible to make text fields editable and thus use them directly as input field without having to select the text field and without having to open its properties dialog.
    To do so, the checkbox ”Text field is editable” has to be activated in the properties window of the text field at the bottom left of the tab sheet ”Text”.
    There are some new variants for optical highlighting on the tab sheet ”Format” under ”Outline” (e.g. the style ”sunken edge“). When you click into the field (left mouse button) you get directly into an editing mode to change the text and the value respectively.

    Line feed in editable text can be executed with Ctrl-M. The text field can be selected with the right mouse button; then the properties dialog of the text field can be opened by double-click or enter key.
    In order to use this text and this value, respectively, in the model, you can create a reference via the name and the attribute “TEXT” of the text field.

    Example: to use the input field with the name ”Textobject_1” for specifying the nominal value of a controller, you enter ”Textobject_1.TEXT” at the controller in the field SCV.
    In this case, the text field may then contain numbers only.