Cours Lua Scripting Brian Lassiter Director of EA, tutoriel & guide de travaux pratiques en pdf.
Element Field Creation
• Lua scripts can create new element fields
• Defined as .elua files and must reside in C:
\Milsoft\Programs\Scripts\eLua
• Perform calculations on existing data
• Upline and downline tracing/searching
Example Element Fields
• Total kW Loss – summation of kW loss on all elements downline from selected
• Upline Device – search upline to find device and equipment of device
• Min Downline Voltage – Search downline and return lowest voltage downline
Running Scripts
• Utilities, Script manager
– Select Script
– Hit Run
• Scripts can be tagged as favorite and run from Utilities, Execute Script
Script Manager Features
• Create new scripts
• Run selected scripts
• Create scripts from templates
• Add eLua fields to Selected Elements tab eLua Templates
• Allows user to easily create a new element field based on pre-defined template
• Milsoft provides templates
Assigning to Toolbar
• Frequently used script can be a toolbar button
• Right click on custom toolbar, assign Lua script
– SumLength.lua