"&linkinfo" is the address of the linkinfo structure.
1. Fills the passed linkinfo structure with the tag connection information.
2. Executing user-defined code, depending on the return value of the function.
GetLinkedVariable example
{
char* pszVarName = NULL;
char szVarName[_MAX_PATH+1];
//Get the TagName
pszVarName = GetLinkedVariable("gs_stand_graph_00","StaticText6","Visible");
//Copy the string
if (strcmp (pszVarName,"")!= 0)
{
strncpy(szVarName,pszVarName,_MAX_PATH);
}
else printf("Attribute 'visible' is not made dynamic\r\n");
}
//User defined code where the
//user can do something with the return value
...
}
Parameters of the GetLinkedVariable function:
"gs_stand_graph_00" is the name of the picture in which the object was configured.
"StaticText6" is the name of the object.
"Visible" is the property connected to a tag.
1. Temporarily store the return value of the GetLinkedVariable function in pszVarName.
2. If a valid value has been returned, store the return value in szVarName. A maximum of
_MAX_PATH characters is stored.
3. Executing user-defined code for processing return values.
GetLocalPicture example
{
char* pszPicName = NULL;
char szPicName[_MAX_PATH+1];
//Get the Local Picture
pszPicName = GetLocalPicture(lpszPictureName);
ANSI-C function descriptions
3.4 Appendix
MDM - WinCC: Scripting (VBS, ANSI-C, VBA)
System Manual, 11/2008,
1483