7 Replies Latest reply on Aug 2, 2018 8:08 AM by msh666

    add symbols by code

    msh666

      Hello,

       

      Can I somehow edit display to add some symbols by code in PI Vision ?

      Ex. A button which add new Value to Display

        • Re: add symbols by code
          jru

          Hi Dmitry,

           

          Thanks for posting on PI Square and welcome to the community.

           

          Can you provide us with a product.  We have many Visualization Products that can display values.  Please let us know and we'll see if we can find an appropriate solution for you.

           

          ~Jesse

          1 of 1 people found this helpful
            • Re: add symbols by code
              msh666

              Yea, I see this tutorials, but the idea not in creation custom symbols. Idea is add any symbol (custom or standard) to display using code, not PI Vision drag & drop functions.

              The usuall case look like this: we select asset, then attribute and the drug it to display. My needs is to avoid this process. And some how add it by my self. Edit some display file(if it is exists)
              or create custom symbols which will do it for me.

                • Re: add symbols by code
                  LucasERAS69

                  I don't know if it's possible.

                   

                  If you want to use code to add symbols  then doing your interface entirely in HTML/javascript would probably be the best solution. You could also use an iframe to bring your PiVision interface to a webpage and then add symbols. It's very simple but you'll need to find a way to position the symbols correctly.

                   

                  Keep in mind, I'm not an expert in PiVision so I don't know if it's really possible or not, but coding a webpage is how I'll resolve your problem.

              • Re: add symbols by code
                Roger Palmen

                I think it should be possible and not that difficult, but i would consider this a hack, thus unsupported. After all, from JavaScript you have access to all the code on the page so you should be possible to do anything that PI Vision does.

                 

                I would either have a look at the PiVision sourcecode .js files to find out how a symbol is added, or just open the PI Vision page, In Developer tools look at the Event Listeners on the various elements, and find out which calls are made.

                2 of 2 people found this helpful
                • Re: add symbols by code
                  msh666

                  Hello,

                   

                  If someone will be interested in the same question: "how to add any symbol by code". I find the answer during work.
                  It is possibe to do using displayProvider and function:

                  addSymbol(symbolOrTypeName, x, y, dataSources, config)
                  

                   

                  Thanks all for your help

                  1 of 1 people found this helpful