LUALoriotPro WEB site

LoriotPro scripting documentation
Extensions for LUA language

Table of contents Search function

Print the current page Mail this  link UTUBE Channel version française

lpav.GetGlobalOption - Get the global parameters of a view

LoriotPro has extended the LUA sripting language by providing its own LUA libraries. The new functions provided are dedicated to the creation of monitoring and SNMP automation application.

Syntax 

Result = Lpav.GetGlobalOption(array);

Description

Read the global parameters of an Active View and store the results in an array

Parameters

array - The array name.

Return Values

result = 1 if the array is filled or nil if error.

arrayname['defip'] The default IP address assigne to this Active View
arrayname['mapname'] The Active View name
arrayname['fontname'] The text font by default
arrayname['fontsize'] The font size
arrayname['fontitalic'] The font type
arrayname['linewidth'] The line width
arrayname['linestyle'] The line style
arrayname['maxx'] The maximum size of the Active view width
arrayname['maxy'] The maximum size of the Active view hight
arrayname['ZoomAuto'] Zomm with constrain proportions
arrayname['ZoomIndex']  
arrayname[‘ScaleX’]  
arrayname[‘ScaleY’]  

Exemple


lp_value = 0;
lp_buffer ="error";
-- require(lp.GetPath().."/config/script/loriotinit.lua");
if lpav.GetGlobalOption("a") then -- place les réponses dans une array a
lp.Trace("defip>"..a.defip);
lp.Trace("mapname>"..a.mapname);
lp.Trace("fontname>"..a.fontname);
lp.Trace("fontsize>"..a.fontsize);
lp.Trace("fontitalic>"..a.fontitalic);
lp.Trace("linewidth>"..a.linewidth);
lp.Trace("linestyle>"..a.linestyle);
lp.Trace("maxx>"..a.maxx);
lp.Trace("maxy>"..a.maxy);
lp.Trace("ZoomAuto>"..a.ZoomAuto);
lp.Trace("ZoomIndex>"..a.ZoomIndex);

end




www.loriotpro.com