Bosch Building Technologies

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    How can you change the Decoder Layout with BVMS SDK script?

    Question

     

    How can you change the Decoder Layout with BVMS SDK script?

     

    Answer

     

    Check the following sample script. It is not a working script, that can be used directly. Follow the instructions in comments of the script to tailor it for your use.  

     

    There is VIDEOJET decoder 8000.

    The decoder is added to the AMG

    AMG is added to the logical tree

     

        [Scriptlet("dd34571a-43b0-41ae-9231-9ba7e31629c1")]

        public void SetDisplayLayout(EventData e)

        {

     

    //logical Number is the number you see in the AMG icon at CC, when you add the decoder to AMG, choose the layout 1x1

      Decoder dec1 = DecoderManager.GetDecoderByLogicalNumber(LogicalNumber);

     

      //get the suported layout of the decoder

       IList<DisplayLayout> supportedDisplayLayouts = decoderManager.GetSupportedDisplayLayouts(dec1);

         

    //here need to loop over the layouts and to choose the one according to description

                bool setDisplayLayoutOK = false;

                foreach (var displayLayout in supportedDisplayLayouts)

                {

                    //the description is equal to the Layout title one can see in ConfigClient-Devices-MonitorGroups -MG - right window where

                   // under Layout are shown the icons and title of all supported Layouts for this particular MG (after decoder is connected to it)

                    if (displayLayout.Description == "2x2")

                    {

                       //set 2x2 layout for the decoder dec1    

                        setDisplayLayoutOK = RSApi.DecoderManager.SetDisplayLayout(dec1, displayLayout);

                       //not needed to finish the loop

                        break;

                    }

                }

     

      }

     

     

    Central_Support_0-1657810951616.png

     

    This is fixed in BVMS 11.1.1.

    BVMS 11.1.1 is released and available for download in the Product Catalog.

    Version history
    Last update:
    ‎07-14-2022 05:05 PM
    Updated by:
    Contributors
    Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist