EWN - Error, Warning, Note

Info about design forms features
PetrS
Site Admin
Posts: 181
Joined: 11 Jul 2014, 13:55

EWN - Error, Warning, Note

Postby PetrS » 06 Oct 2014, 11:58

size=150EWN - Error, Warning, Note/size

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
EWN_Header_editor.jpg (118.26 KiB) Viewed 9053 times
/attachment
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
EWN_Editor.jpg (76.72 KiB) Viewed 9053 times
/attachment


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
:!: Note: EWN_Example.xml must be saved to EWN folder (see above).
Attachments
EWN_Example.xml
(957 Bytes) Downloaded 492 times
EWN.cls
(24.04 KiB) Downloaded 490 times
Ing. Petr Slepicka
DesignForms Online
Engineering calculations online - EuroCode, AISC, statics
Automate your static calculations today!

Jirka Porada
Posts: 1
Joined: 22 Oct 2014, 07:18

Re: EWN - Error, Warning, Note

Postby Jirka Porada » 07 Nov 2014, 16:16

It would not be a bad idea to agree on having a ceratin list of general E/W/N messages which would be then used among all the templates. The main purpose would be to avoid having several message for one issue.. As already discussed in the xml file would be the main set of E/W/N and then also some additional sets for example per check.. The most important would be to gether the general messages among the templates to have something to start with.. What do you think?

Jirka

PetrS
Site Admin
Posts: 181
Joined: 11 Jul 2014, 13:55

Re: EWN - Error, Warning, Note

Postby PetrS » 18 Nov 2014, 12:05

EWN Codes MUST start with letter "E" (Errors), "W" (Warnings) or "N" (Notes).
The rest of the code is arbitrary.

I propose to share common EWN file on SVN.
I have prepared file urlhttps://svn.praha.scia.cz/rep_esa_61/contractors/OpenChecks/DesignForms%20P/_PublicDocuments/EWN/EWN_SCIA.xml/url
Each SDF developer can create his/her own messages to the local copy of that file. Than merge changes back to SVN.
To avoid EWN Code collisions, codes should be composed like this: i<E/W/N>_<DeveloperShortCut>_<Number>/i

uExamples:/u
E_VAL_01, W_DLO_05, N_POR_33.
Ing. Petr Slepicka
DesignForms Online
Engineering calculations online - EuroCode, AISC, statics
Automate your static calculations today!

PetrS
Site Admin
Posts: 181
Joined: 11 Jul 2014, 13:55

Re: EWN - Error, Warning, Note

Postby PetrS » 19 Jan 2015, 15:18

size=150EWN.TraceRectEWN/size

There is a new method for tracing EWN:
list
*object TraceRectEWN(string Code, double Width)/*:m
*object TraceRectEWN(string Code, bool PrintType, bool PrintDescription, bool PrintSolution, double Width)/*:m/list:u
Command iEWN.TraceRectEWN/i do exactly the same as iEWN.TraceEWN/i, but the output is drawn to rectangular box.

buCompare outputs:/u/b
attachment=0
Clipboard01.jpg
Clipboard01.jpg (29.2 KiB) Viewed 9013 times
/attachment
Ing. Petr Slepicka
DesignForms Online
Engineering calculations online - EuroCode, AISC, statics
Automate your static calculations today!

PetrS
Site Admin
Posts: 181
Joined: 11 Jul 2014, 13:55

Re: EWN - Error, Warning, Note

Postby PetrS » 28 Jan 2015, 09:34

Two commands were added to EWN tool:
list
*object TraceEWN(string Code, double Width)/*:m
*object TraceRectEWN(string Code, bool PrintType, bool PrintDescription, bool PrintSolution, double Width)/*:m/list:u
These commands are similar to "TraceRectEWN", but do NOT draw rectangle around the message.

Complete list of commands for tracing errors, warnings and notes:
list
*object TraceEWN(string Code)/*:m
*object TraceEWN(string Code, string Param)/*:m
*object TraceEWN(string Code, bool PrintDescription, bool PrintSolution)/*:m
*object TraceEWN(string Code, bool PrintDescription, bool PrintSolution, string Param)
/*:m
*object TraceEWN(string Code, double Width)/*:m
*object TraceEWN(string Code, double Width, string Param)/*:m
*object TraceEWN(string Code, bool PrintType, bool PrintDescription, bool PrintSolution, double Width)/*:m
*object TraceEWN(string Code, bool PrintType, bool PrintDescription, bool PrintSolution, double Width, string Param)
/*:m
*object TraceRectEWN(string Code, double Width)/*:m
*object TraceRectEWN(string Code, double Width, string Param)/*:m
*object TraceRectEWN(string Code, bool PrintType, bool PrintDescription, bool PrintSolution, double Width)/*:m
*object TraceRectEWN(string Code, bool PrintType, bool PrintDescription, bool PrintSolution, double Width, string Param)/*:m/list:u
Ing. Petr Slepicka
DesignForms Online
Engineering calculations online - EuroCode, AISC, statics
Automate your static calculations today!

PetrS
Site Admin
Posts: 181
Joined: 11 Jul 2014, 13:55

Re: EWN - Error, Warning, Note

Postby PetrS » 19 Mar 2015, 09:16

size=150Inline strings/size
Version: 13.400.27+

EWN messages can now contain "place holders". These place holders are substituted with proper content at runtime.
Replacing content is defined by additional parameter of EWN.TraceEWN / EWN.TraceRectEWN command.

buExample of EWN messages with place holders:/u/b
W1 | Length of {0} edge is insufficient. | Increase length of {0} edge.

buExample of command with additional parameter:/u/b
EWN.TraceRectEWN("W1", 300, "S_Upper");

iSee attached example for more details.
:!: Don't forget upload EWN_Example.xml to PublicDocuments\DesignForms_X.Y\EWN./i
Attachments
EWN_Example.xml
(1.18 KiB) Downloaded 427 times
EWN with param.cls
(27.16 KiB) Downloaded 416 times
Ing. Petr Slepicka
DesignForms Online
Engineering calculations online - EuroCode, AISC, statics
Automate your static calculations today!


Return to “Design forms features”

Who is online

Users browsing this forum: No registered users and 4 guests