wincc全局腳本動(dòng)作-------隱藏控件
#include "apdefap.h"
int gscAction( void )
{
// WINCC:TAGNAME_SECTION_START
// syntax: #define TagNameInAction "DMTagName"
// next TagID : 1
// WINCC:TAGNAME_SECTION_END
int value;
value=GetTagBit("IM_in");//"IM_in"為觸發(fā)的變量。
if(value==1)
{
SetVisible("lianxi.pdl","按鈕8",TRUE);//lianxi.pdl為控制對(duì)象所在畫面名,“按鈕8”為對(duì)象名稱
}
else
{
SetVisible("lianxi.pdl","按鈕8",FALSE);//lianxi.pdl
}
// WINCC:PICNAME_SECTION_START
// syntax: #define PicNameInAction "PictureName"
// next PicID : 1
// WINCC:PICNAME_SECTION_END
return 0;
}
=====================================================
說(shuō)明:在觸發(fā)器里選擇變量IM_in
|