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.SetClipart - Load or change the clipart linked to a graphical object

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

lpav.SetClipart("file.emf")

Description

Change or load the clipart to associate with the selected object.

Warning: This function is not supported by the foloowing object : LPAV_OBJ_RECT = 30; LPAV_OBJ_CIRCLE = 31; LPAV_OBJ_FILL_RECT = 32; LPAV_OBJ_FILL_CIRCLE = 33; LPAV_OBJ_H_LINE = 34; LPAV_OBJ_V_LINE = 35; LPAV_OBJ_TEXT = 37; LPAV_OBJ_FILL_TEXT = 38; LPAV_OBJ_FULL_RECT = 39; LPAV_OBJ_FULL_CIRCLE = 40; LPAV_OBJ_H45_LINE = 41; LPAV_OBJ_V45_LINE = 42; LPAV_OBJ_FULL_TEXT = 43; LPAV_OBJ_CONNECTOR =144;

Parameters

file.emf - The clip art file name. Clipart are store in the bin/card directory

Example

lp_value = 0;
lp_buffer ="error";

dofile(lp.GetPath().."/config/script/loriotinit.lua");

zz=LPAV_OBJ_ANALOGIC_METER_01;

-- Créé des objects r s
k=0;
for i=0,20 do
lpav.Insert(10*i,1,9,9,zz);
if (k==0) then lpav.SetRef(1,"r"); k=1; else lpav.SetRef(1,"s"); k=0; end
lpav.SetBrush(0,255,0);
lpav.SetFontName("Mistral");
lpav.SetName(i);
lpav.SetClipart( lp.GetPath().."/card/vumeters/vumeter8.emf");
lpav.SetOption(LPAV_UNIT,"%");
end
lpav.RefreshMap();


 



www.loriotpro.com