Im trying to extract data from a process analyst object, to create custom trend controls.
The object exists on a citect page and onPageShow, I call a function:
######################################
FUNCTION ConfigurePA()
OBJECT hPanes, hPane, hPens, hPen;
STRING sPen1Comment;
hPanes = _ObjectGetProperty(ObjectByName("AN23"), "Items");
hPane = _ObjectCallMethod(hPanes, "get_Item", 1);
hPens = _ObjectGetProperty(hPane, "Items");
hPen = _ObjectCallMethod(hPens, "get_Item", 1);
_ObjectCallMethod(hPen, "GetField", "Comment", sPen1Comment);
END //ConfigurePA()
######################################
Im trying to extract the tag comment from pen 1, so I can display it on the citect page. However, It doesn't work at all and I end up with two errors.
ERROR1:
Error 274: DESC: 'Invalid argument passed'
ERRPAGE: '_ObjectGetProperty'
ERRDESC: 'ConfigurePA'
ERROR2:
Error 433: DESC: 'Cicode type mismatch'
ERRPAGE: '_ObjectGetProperty'
ERRDESC: 'ConfigurePA'
Is it possible I dont have the function library included? From looking at the errors, Citect example code, and tinkering.. I cant find the problems!
Thanks for any help.
The object exists on a citect page and onPageShow, I call a function:
######################################
FUNCTION ConfigurePA()
OBJECT hPanes, hPane, hPens, hPen;
STRING sPen1Comment;
hPanes = _ObjectGetProperty(ObjectByName("AN23"), "Items");
hPane = _ObjectCallMethod(hPanes, "get_Item", 1);
hPens = _ObjectGetProperty(hPane, "Items");
hPen = _ObjectCallMethod(hPens, "get_Item", 1);
_ObjectCallMethod(hPen, "GetField", "Comment", sPen1Comment);
END //ConfigurePA()
######################################
Im trying to extract the tag comment from pen 1, so I can display it on the citect page. However, It doesn't work at all and I end up with two errors.
ERROR1:
Error 274: DESC: 'Invalid argument passed'
ERRPAGE: '_ObjectGetProperty'
ERRDESC: 'ConfigurePA'
ERROR2:
Error 433: DESC: 'Cicode type mismatch'
ERRPAGE: '_ObjectGetProperty'
ERRDESC: 'ConfigurePA'
Is it possible I dont have the function library included? From looking at the errors, Citect example code, and tinkering.. I cant find the problems!
Thanks for any help.