Writing custom calculations enhancements

Tekla Tedds
2022
Tekla Tedds Tekla Tedds for Word

Writing custom calculations enhancements

Tekla Tedds 2022 introduces new functions which can be used when writing custom calculations, including:

  • CubeRoot: Calculates the cube root of a value including support for negative values.

  • EvalText: Calculate a string containing multiple delimited expressions including direct variable assignments (a = …).

  • StrListJoin: StrListJoin can be used to concatenate two string lists.

  • StrListUnique: Removes all consecutive duplicate elements from a sorted string list.

  • StrListMerge: Merges two sorted string lists into a single string list.

  • StrListUnion: Creates a sorted string list consisting of the elements that exist in one or both sorted string lists.

  • StrListIntersection: Creates a sorted string list from two sorted string lists which consists of the elements that exist in both lists.

  • StrListDifference: Creates a sorted string list from two sorted string lists consisting of the elements which exist in the first list but not in the second list.

  • StrListSymmetricDifference: Creates a sorted string list consisting of the elements which exist in either of two sorted string lists but not both.

The Tedds calculator has been enhanced so that it can support locally scoped variables. The lifetime of a locally scoped variable is limited to the operation which creates the variable. This allows new calculator functions to be implemented which make it easier to write reusable and reliable expressions which do not have unintended side effects.

New functions which use locally scoped variables include:

  • Let: Assigns values to named variables which can then be used in a calculated expression for which those variables only apply within the scope of the Let function.

  • InitLocalVar: Assigns a value to a local variable if that local variable doesn’t already exist.

  • InitLocalVars: Assigns a value to one or more local variables if the local variable doesn’t already exist.

New optimization processing when Word Calc Items are stored in Calc Libraries which can reduce the storage size of individual calc items by up to 75%. Smaller items will calculate more quickly due to the reduced data which needs to be processed.

User interfaces embedded in documents now support the _CalcUI variable. This variable can be used to conditionally show or hide the user interface which allows the calculation to be automated, for example using the Tedds batch design.

User Interfaces created using the Interface Designer Pro application can use a new optional Debug command button on the toolbar which can be used to execute a custom expression to perform operations which help to resolve bugs.

Enhanced Save Marked Up Calc Items command. The command has been optimized to ensure that Calc Items are only saved if the item content of properties have been modified and the document insertion point is now restored to its original location when the command has finished.

Progress Log

New option to indent the items listed in the progress log. The displayed indent increases as each Calc Item is calculated and decreases when an item has finished calculating so that you can visually determine which items in the log relate to which parent calc item.

Debug events for example when using WatchVar and WatchFunction are now logged using their own Debug Item in the log.

Update the styling and default colour scheme used by the progress log for improved visual fidelity and overall consistency with the rest of the product.

Was this helpful?
Zurück
Weiter