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.ShiftPositionAllSelected - Move all the selected objects

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

number=lpav.ShiftPositionAllSelected(x,y) ;
number=lpav.ShiftPositionAllSelected(x,y,x1,y1) ;

Description

Change the position of a group of graphical objects on the Active View. The size of the object can also be changed with this function.

Remark

Graphical object coordinates can't be negative. X and Y coordinate are always set to the uper left corner of the Active View drawing area.

Parameters

X - The horizontal shift in pixel from the current position to the new position
Y - The vertical shift in pixel from the current position to the new position

x1 - The horizontal size sift in pixel from the current size to the new size
y1 - The horizontal size sift in pixel from the current size to the new size

Return Values

result=1 if ok, nil if error.

Example


lp_value = 0;
lp_buffer ="error";
lpav.Append(lp.GetPath().."/config/active-view/sample/Cisco3500.cmp");
lpav.RefreshMap();
lp.Break("pause");
lpav.ShiftPositionAllSelected(100,100);
lpav.RefreshMap();
lp_buffer ="Ok";

 


www.loriotpro.com