SDF 0.1.65+ introduce new hardcoded support for handling errors, warnings and notes.
All the functionality is provided by static system object EWN. This object is used to add (throw), store and handle all script errors, warnings and notes.
EWN automatically handle also all runtime errors (invalid parameters, ...).
ubEach EWN record consists of:/b/u
list
*Code - unique text code which identify the record in given file. Code must start with letter "E", "W" or "N"./*:m
*Description - brief description of EWN./*:m
*Solution - proposal of solution(s) of the EWN./*:m/list:u
Description and Solution can be translated; automatic translation using RC Maker is available.
ubEWN Source file:/b/u
List of all avaiable EWNs is defined in external file (.XML). This file must be linked to the calculation by setting "EWN source file" in Header editor:
attachment=3
- EWN_Header_editor.jpg (118.26 KiB) Viewed 9053 times
All EWN source files must be saved in folder "iPublicDocuments\DesignForms_x.y\EWN\/i". EWN source file editor (see below) automatically starts in this directory. You will not be allowed to save EWN source file to another location.
ubEWN Editor:/b/u
You can create and/or modify existing EWN files using built-in editor. It is available in Design Forms Builder -> Main menu -> View -> Open EWN Editor.
attachment=2
- EWN_Editor.jpg (76.72 KiB) Viewed 9053 times
ubEWN methods and properties:/b/u
list
*Trace(string Code) - save error, warning or note. EWN is defined by specified Code. No message is printed to the output./*:m
*Trace(string Code, bool PrintDescription, bool PrintSolution) - save error, warning or note; set 2. and 3. parameter to print Description and/or solution to the output.
/*:m
*DrawTable() - draw summary table of all errors, warnings and notes./*:m
*DrawTable(int Count) - draw summary table of with "Count" last errors, warnings and notes./*:m
*DrawTable(int From, int To) - draw summary table with errors, warnings and notes with Index inside specified range.
/*:m
*GetTable() - get summary table of all errors, warnings and notes./*:m
*GetTable(int Count) - get summary table of with "Count" last errors, warnings and notes./*:m
*GetTable(int From, int To) - get summary table with errors, warnings and notes with Index inside specified range.
/*:m
*EWN - list of all saved errors, warnings and notes/*:m
*Errors - list of all saved errors/*:m
*Warnings - list of all saved warnings/*:m
*Notes - list of all saved notes/*:m/list:u
Full list of function is available in IntelliSense window.
buConnection with SCIA Engineer/u/b
Calculations run by CalcExe (linked to SCIA Engineer) automatically attach all Errors, Warnings and Notes to the calculation results.
buSee simple attached example for more info./u/b
