How to set interaction mode to PanZoom in scripts?

Hi experts,

When I create a Frame Window and drag a symbol in it ,I can set  the property of interaction mode to PanZoom as below:

But I want to use showgraphic() function to show the symbol dynamically ,I can't find the property of interaction mode to set.

How can I achieve this function is scripts?

Thanks in advanced.

Parents Reply Children
  • Hi Rainer,

    Step1:

    There are a frame window named mixer and a industrial graphic named mixer. Embed the industrial graphic into the frame window;

    Step2:

    Set the interaction mode property to PanZoom;

    Step3:

    Create a industrial graphic named Nav,

    step4:

    In the Nav symbol scripts pane ,add a named scripts:

    Dim graphicInfo as aaGraphic.GraphicInfo;

    graphicInfo.Identity = "InTouch:" + WindowName;

    'if WindowName == "Mixer_Browser" then
    if WindowName == "Mixer" then
    graphicInfo.GraphicName = "Mixer";
    Dim cpValues [34] as aaGraphic.CustomPropertyValuePair;
    cpValues[1] = new aaGraphic.CustomPropertyValuePair("Agitator.EquipState", MixerName + "_Agitator_PV", true);
    cpValues[2] = new aaGraphic.CustomPropertyValuePair("Inlet1.EquipStateActive", MixerName + "_Inlet1_OLS AND NOT " + MixerName + "_Inlet1_CLS", true);
    cpValues[3] = new aaGraphic.CustomPropertyValuePair("Inlet1.PV", MixerName + "_Inlet1_Position", true);
    cpValues[4] = new aaGraphic.CustomPropertyValuePair("Inlet1.PVMax", MixerName + "_Inlet1_Position.MaxEU", true);
    cpValues[5] = new aaGraphic.CustomPropertyValuePair("Inlet1.PVMin", MixerName + "_Inlet1_Position.MinEU", true);
    cpValueshttps://softwareforums.aveva.com/cfs-file/__key/system/emoji/1f608.svg = new aaGraphic.CustomPropertyValuePair("Inlet2.EquipStateActive", MixerName + "_Inlet2_OLS AND NOT " + MixerName + "_Inlet2_CLS", true);
    cpValues[7] = new aaGraphic.CustomPropertyValuePair("Inlet2.PV", MixerName + "_Inlet2_Position", true);
    cpValueshttps://softwareforums.aveva.com/cfs-file/__key/system/emoji/1f3b5.svg = new aaGraphic.CustomPropertyValuePair("Inlet2.PVMax", MixerName + "_Inlet2_Position.MaxEU", true);
    cpValues[9] = new aaGraphic.CustomPropertyValuePair("Inlet2.PVMin", MixerName + "_Inlet2_Position.MinEU", true);
    cpValues[10] = new aaGraphic.CustomPropertyValuePair("Outlet.EquipStateActive", MixerName + "_Outlet_OLS AND NOT " + MixerName + "_Outlet_CLS", true);
    cpValues[11] = new aaGraphic.CustomPropertyValuePair("Outlet.PV", MixerName + "_Outlet_Position", true);
    cpValues[12] = new aaGraphic.CustomPropertyValuePair("Outlet.PVMax", MixerName + "_Outlet_Position.MaxEU", true);
    cpValues[13] = new aaGraphic.CustomPropertyValuePair("Outlet.PVMin", MixerName + "_Outlet_Position.MinEU", true);
    cpValues[14] = new aaGraphic.CustomPropertyValuePair("Pump1.EquipState", MixerName + "_Pump1_PV", true);
    cpValues[15] = new aaGraphic.CustomPropertyValuePair("Pump2.EquipState", MixerName + "_Pump2_PV", true);
    cpValues[16] = new aaGraphic.CustomPropertyValuePair("Pump1_CMD.Cmd", MixerName + "_Pump1_CMD", true);
    cpValues[17] = new aaGraphic.CustomPropertyValuePair("Pump2_CMD.Cmd", MixerName + "_Pump2_CMD", true);
    cpValues[18] = new aaGraphic.CustomPropertyValuePair("Level.PV", MixerName + "_Level_PV", true);
    cpValues[19] = new aaGraphic.CustomPropertyValuePair("Level.PVRangeFullScaleMax", MixerName + "_Level_PV.MaxEU", true);
    cpValues[20] = new aaGraphic.CustomPropertyValuePair("Level.PVRangeFullScaleMin", MixerName + "_Level_PV.MinEU", true);
    cpValues[21] = new aaGraphic.CustomPropertyValuePair("Temperature.PV", MixerName + "_Temperature_PV", true);
    cpValues[22] = new aaGraphic.CustomPropertyValuePair("Temperature.PVRangeFullScaleMax", MixerName + "_Temperature_PV.MaxEU", true);
    cpValues[23] = new aaGraphic.CustomPropertyValuePair("Temperature.PVRangeFullScaleMin", MixerName + "_Temperature_PV.MinEU", true);
    cpValues[24] = new aaGraphic.CustomPropertyValuePair("Temperature.AlarmMostUrgentAcked", MixerName + "_Temperature_PV.Ack", true);
    cpValues[25] = new aaGraphic.CustomPropertyValuePair("Temperature.AlarmMostUrgentInAlarm", MixerName + "_Temperature_PV.Alarm", true);
    cpValues[26] = new aaGraphic.CustomPropertyValuePair("Temperature.AlarmHiLimit", MixerName + "_Temperature_PV.HiLimit", true);
    cpValues[27] = new aaGraphic.CustomPropertyValuePair("Temperature.AlarmLoLoLimit", MixerName + "_Temperature_PV.LoLoLimit", true);
    cpValues[28] = new aaGraphic.CustomPropertyValuePair("TempPen_PV", MixerName + "_Temperature_PV", true);
    cpValues[29] = new aaGraphic.CustomPropertyValuePair("TempPen_Min", MixerName + "_Temperature_PV.MinEU", true);
    cpValues[30] = new aaGraphic.CustomPropertyValuePair("TempPen_Max", MixerName + "_Temperature_PV.MaxEU", true);
    cpValues[31] = new aaGraphic.CustomPropertyValuePair("LevelPen_PV", MixerName + "_Level_PV", true);
    cpValues[32] = new aaGraphic.CustomPropertyValuePair("LevelPen_Min", MixerName + "_Level_PV.MinEU", true);
    cpValues[33] = new aaGraphic.CustomPropertyValuePair("LevelPen_Max", MixerName + "_Level_PV.MaxEU", true);
    cpValues[34] = new aaGraphic.CustomPropertyValuePair("Tank.Label", MixerName, true);
    graphicInfo.CustomProperties = cpValues;
    endif;

    ShowGraphic( graphicInfo );

    step 5: demo run

    choose mixer100 asset

    choose mixer300 asset

    There is  a zoom setting in the bottom left of Mixer.

    Hope this information is useful for you.