How to activate a slide-in pane using script (OMI Toolkit)?

Hello Heroes,

I am trying to open a slide in pane containing Historian Client using a script in my ViewApp, not the Hamburger-button.

I have a bit that i set to "True" with a toggle button, then I have a "While True" script running when the bit is true.

I have tried running this;

ArchestrA.Client.ViewApp.ViewApplication.Application.ActivateSlideInPane(MyContent.HistoricalTrendControl1,ArchestrA.Client.ViewApp.SlideInPanePosition.Top);

I get no errors, and nothing in logs when i press the button. But the slide-in pane does not active/slide in. Any help available?

The documentation of the toolkit says to use an reference to a control object and position of slide in pane as parameters in the function call:

  • +1 On this one!

    It is a very good question, I also have several projects where it would be an advantage to be able to show or hide the slide in panel using scripting and I have not been able to resolve this.

    And also, (I don't want to hijack this thread) but still I'm looking for a way to close the slide in navigation pane when you click on a navigation item, as of now I have to click outside the slide in panel to remove it. Perhaps there is an easy fix, but I must admit my limitations on the possibilities here.

      I know you were asking for similar things in multiple projects?

  • Hi Jakob,

    Unfortunately we have both been unable to find an answer, so far.

    If I can guess the intention for that example code in OMI toolkit is intended to be executed from a OMI App, so the Control (Object) reference is perhaps not the intended content, and perhaps the Top/Left/Right/Bottom reference is to open whatever slide-in pane on the 'same' level, but I can not get it to work either way so I can not say.

    I have created a ticket for this issue since we now have several customers who is asking for a more intuitive way of interacting with the slide in panes.

    I don't have the possibility to put the time in to guesstimate code here so I have created a ticket for this and will report back whatever we figure out Slight smile

    Would be sad to create a OMI app just for this function (Hamburger app, I'm looking at you ;) )

  • I got the following response from techsupport.

    There is no function available to open a Slide-in pane via script. There are already enhancement requests (CR#L00156117; CR#1892877 requesting this feature in older versions. It has not been implemented yet.

    You can use Showcontent() in layout scripting to show certain layout or graphic on a specific pane in runtime. If you set the content of the pane(and turn off autofill on the pane) to match the content of the graphic, the pane will be hidden until you trigger Showcontent. This will kinda mimic slide-in.

    Created enhancement CR-138857 (IMS#2279932) for this feature request in v2023. Please contact product.marketing@aveva.com in the future to find out the status of this request.

    ---

    Perhaps not the answer we are looking for, but at least we know there is no native function for this.

  • Thank you for updates and detailed information, I'm looking forward for this feature to be added!

    I just found out about keyboard shortcuts to activate slide-in panes: https://docs.aveva.com/bundle/sp-omi/page/309105.html

    I'm able to just use Alt + Shift + Arrow Key to activate a pane, which is intuitive enough for our operators! Thank you again :)

  • we have implemented this on several galaxies.

    The script you mention is correct : 

    ArchestrA.Client.ViewApp.ViewApplication.Application.ActivateSlideInPane(MyContent.HistoricalTrendControl1,ArchestrA.Client.ViewApp.SlideInPanePosition.Top);

    but you need to point to an existing content. I can see that you don’t have a content called historicaltrendcontrol1. Make sure you have the top slide in pane configured.

    on which version are you trying the script ?

    i don’t understand why support keeps saying it’s not possible .. 

  • Hi Loris,

    Thanks for jumping in to this discussion.

    I did try this using 2023 R2 P01, i used a script contained in the layout and thanks to autocomplete, I'm sure I'm referring to an existing object that is contained in my slide in pane.

    So in my case I must be missing something.

    I do know that the script executes and I do not capture any exceptions. 

    Is it possible for you to share the code you use, or any other things that could be the reason for my environment to deviate from your working solution. 

  • Hi Richard,

    i remember my colleague had issue with the latest versions of SP and he told me he had to simply take off the mycontent.historicaltend..part.

    I’ll ask tomorrow but I have tried the exact script on 2020r2sp1 version recently successfully.

    i keep you posted

  • Thank you for your insights, Loris - excited to hear how you got it to work! :)

  • I have tried the following in 2023 R2 P01 without success. I have tried reference and as per your indication, omit reference to any control (Object parameter).
    I'm at the moment installing 2020 R2 SP1 in a test setup to check if the behavior is different.

1 2 3