Trouble Pen display in Process Analyst

Hello Everbody

I configured a trend in process analyst object with fixed pens (8 fixed pens).

In runtime, the trend display in process analyst doesn't display the trends.

You can see in picture below the connection configuration of pen (GALP is a cluster difened in this project)

as soon as i press in "add pen button" the trends start showing.

I would like to understand why is the trouble that avoid the pens display in panel on process analyst.

Thank you 

Miguel

Parents
  • Hi Miguel,
    It can be helpful to mention the version of Citect you are using, just in case it is a known issue and we can share a version with the fix.
    I am assuming you are loading the pens using cicode? There can sometimes be a race condition of the page initializing and the ActiveX control (Process Analyst) making its connections and initializing. I'd recommend adding this cicode function call to Page Property 'On page shown' which ensures everything is finished loading before it starts working on the ActiveX control.
    Here is sample cicode which should help you load a pav file with the pens defined:
    FUNCTION ConfigureAnalyst()
    ErrSet(0);
    OBJECT hAnalyst = ObjectByName("AN502");
    _ObjectCallMethod(hAnalyst, "LoadFromFile", "TrendPens.pav", 0);
    OBJECT hToolbars = _ObjectGetProperty(hAnalyst, "Toolbars");
    OBJECT hMainToolbar = _ObjectCallMethod(hToolbars, "get_Item", 1);
    OBJECT hPanes = _ObjectGetProperty(hAnalyst, "Panes");
    OBJECT hPane1 = _ObjectCallMethod(hPanes, "get_Item", 1);
    OBJECT hPens = _ObjectGetProperty(hPane1, "Pens");
    OBJECT hPen1 = _ObjectCallMethod(hPens, "get_Item", 1);
    _ObjectCallMethod(hPen1, "HorizontalScrollBy", -0.3);
    _ObjectCallMethod(hPen1, "Select");
    IsError();
    ErrSet(1);
    END

    Let me know how you go. It does seem like the browse tags makes the Connections valid again.
    Kind regards
    Olivier
Reply
  • Hi Miguel,
    It can be helpful to mention the version of Citect you are using, just in case it is a known issue and we can share a version with the fix.
    I am assuming you are loading the pens using cicode? There can sometimes be a race condition of the page initializing and the ActiveX control (Process Analyst) making its connections and initializing. I'd recommend adding this cicode function call to Page Property 'On page shown' which ensures everything is finished loading before it starts working on the ActiveX control.
    Here is sample cicode which should help you load a pav file with the pens defined:
    FUNCTION ConfigureAnalyst()
    ErrSet(0);
    OBJECT hAnalyst = ObjectByName("AN502");
    _ObjectCallMethod(hAnalyst, "LoadFromFile", "TrendPens.pav", 0);
    OBJECT hToolbars = _ObjectGetProperty(hAnalyst, "Toolbars");
    OBJECT hMainToolbar = _ObjectCallMethod(hToolbars, "get_Item", 1);
    OBJECT hPanes = _ObjectGetProperty(hAnalyst, "Panes");
    OBJECT hPane1 = _ObjectCallMethod(hPanes, "get_Item", 1);
    OBJECT hPens = _ObjectGetProperty(hPane1, "Pens");
    OBJECT hPen1 = _ObjectCallMethod(hPens, "get_Item", 1);
    _ObjectCallMethod(hPen1, "HorizontalScrollBy", -0.3);
    _ObjectCallMethod(hPen1, "Select");
    IsError();
    ErrSet(1);
    END

    Let me know how you go. It does seem like the browse tags makes the Connections valid again.
    Kind regards
    Olivier
Children
No Data