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.SaveGraphToJpeg - Save an Active View to jpeg file (screenshot)

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.SaveGraphToJpeg('filename',quality);

Description

The lpav.SaveGraphToJpeg LUA function save an Active View in a jpeg file.

Warning ! if the file already exit, it is replaced.

Parameters

‘filename’        The name of the jpeg file.

Warning  ! If you want to use the \ character in the path ypu should use the \\ instead. The \ character is use for escape sequence only in LUA.

Quality            Quality of the jpeg, compression factor (1 – 100)

Return Values

value : 1 if OK

Return nil if an error occurs

Example

 

_value = 0;

   lp_buffer ="error";

lpav.Load(lp.GetPath().."/config/active-view/sample/cisco3500.cmp");

lpav.SaveGraphToJpeg(lp.GetPath().."/config/active-view/sample/save01.jpg",50);

   lp_buffer ="ok";

 

jpeg active view

 

 


www.loriotpro.com