Програмне забезпечення Dystlab має власний скриптовий рушій (Scripter), який підтримує мови програмування Pascal та Basic. Scripter можна використовувати для розробки застосунків, рисування рамок у звітах, графічної візуалізації, тощо.


Бібліотека MathTranslator

procedure MathTranslator.Add(Expression: string);

Adds the Expression formula to the document's mathematical model.
Додає до математичної моделі документа вираз Expression.

Example: MathTranslator.Add('F=10 kN');

procedure MathTranslator.Clear;

Removes all variables, functions, and constants from the document's mathematical model.
Видаляє усі змінні, функції, константи з математичної моделі документа.

Example: if ResetCalc then MathTranslator.Clear;

function MathTranslator.Calculate(Expression: string): Double;

"Evaluates the expression Expression and returns the result as a real number.
Обчислює вираз Expression і вертає результат як дійсне число.

Example: x := MathTranslator.Calculate('a*2+100');

function MathTranslator.CalculateStr(Expression: string): string;

Evaluates the expression Expression and returns the result as text. Recommended for physical values.
Обчислює вираз Expression і вертає результат у вигляді тексту. Рекомендується для фізичних величин.

Example: SumForces := MathTranslator.CalculateStr('F1+F2');

function MathTranslator.CalculateStrFmt(Expression, Format: string): string;

Evaluates the Expression expression and returns the result as formatted text. It is recommended for physical values and in cases where you need a specific format and/or a controlled number of characters after the decimal point.
Обчислює вираз Expression і вертає результат як форматований текст. Рекомендується для фізичних величин та у випадках, коли потрібен специфічний формат та/або контрольована кількість знаків після крапки.

Example: SumForces := MathTranslator.CalculateStr('F1+F2', '%1.3f');

function MathTranslator.Convert(Value, Units: string): Double;

Converts a physical value Value to units Units. The result is a real number.
Конвертує фізичну величину Value в одиниці Units. Результат є дійсним числом.

Example: P1 := MathTranslator.Convert('P', 'kPa');

function MathTranslator.ConvertStr(Value, Units: string): string;

Converts a physical value Value to units Units. The result is a string.
Конвертує фізичну величину Value в одиниці Units. Результат є строкою.

Example: ShowMessage('P=' + MathTranslator.ConvertStr('P', 'kPa'));