PDA

View Full Version : Sample How to create a internal Variable



tulon
12th May 2010, 10:07
This sample shows how to create a interna variable in the zenon Workspace (WorkspaceAddIn)


try
{
Var = m Zenon.MyWorkspace.ActiveDocument.Variables().
CreateVar((string )VarNameList [ i ] , VarInfo.zDriver ,
VarInfo.kType , VarInfo.vType ) ;

Var.Tagname = ( string ) VarDescList[i] ;
}
catch ( Exception )
{
MessageBox.Show( " zenon variable could not be created " ) ;
throw;
}