Add Trend Tag to existing/previous trend view [Citect Scada 2018 SA]

Hi,

The Default Info_Trend page, will upon click on the marked button show the tag in a new Process Analyst window. 

I would like to make similar button that will add the Equipment Trend tag to the existing/previous trend view that the user had open. 

Appreciate any suggestions how to assign such an button, what functions would I need to set up etc. ?

Thanks,

Rune

Parents
  • Bradley,

    I've made some progress, the following code will do the trick and act same as the "Button" on the Info_Trend page, as long as the selected equipment is in context and the Info_Trend page is open.

    FUNCTION VIC_InfoTrend()
    WinSelect(6);
    InfoTrend_ShowPADefault();
    END

    Questions:
    The WinNumber, how is that set? I figured out the number "6" by placing a trace variable in TrendPage_ShowForEquipment()
    Test_Variable = nCurWindow;
    What window is this, is it the Info_Trend or the Main Trend page?

    Further how can I be sure the number is 6? Can I retrieve the WinNumber dynamically/automatically by cicode even though the page is not "active". I guess this number can change from project to project and perhaps within a project, or is it locked?
    And finally how can I set a specific page active? I don't quit get hold of the Win function and the help file that follow them.

    Rune
Reply
  • Bradley,

    I've made some progress, the following code will do the trick and act same as the "Button" on the Info_Trend page, as long as the selected equipment is in context and the Info_Trend page is open.

    FUNCTION VIC_InfoTrend()
    WinSelect(6);
    InfoTrend_ShowPADefault();
    END

    Questions:
    The WinNumber, how is that set? I figured out the number "6" by placing a trace variable in TrendPage_ShowForEquipment()
    Test_Variable = nCurWindow;
    What window is this, is it the Info_Trend or the Main Trend page?

    Further how can I be sure the number is 6? Can I retrieve the WinNumber dynamically/automatically by cicode even though the page is not "active". I guess this number can change from project to project and perhaps within a project, or is it locked?
    And finally how can I set a specific page active? I don't quit get hold of the Win function and the help file that follow them.

    Rune
Children
No Data