Announcement

Collapse
No announcement yet.

Dynamic Y line on scope

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Dynamic Y line on scope

    Hi There,

    Is it possible to set the Y-line of a scope through a magic event? If so, what method and property do I use in the event to accomplish this?

    Thanks,

    Mike

  • #2
    I guess I could just make the hide the actual y line on the scopes and then draw one at the correct location independent of the scope?

    Comment


    • #3
      Hi Mike,

      Welcome to the Forum!

      With regards to hiding the actual y line on the scope and drawing a y line that is independent from the scope, this can be done by setting the visibility of y line to no then drawing a horizontal line using the function gfx_Hline(y, x1, x2, color).

      I have attached here a sample project that demonstrates how a winbutton controls the position of the y line of a scope.

      However take note that in this example, controlling the y line position has no effect on the data displayed on the scope.

      Scope_Magic.zip

      BR,

      Pearl


      Pearl

      Comment


      • #4
        Thanks a lot Pearl. I think what I'm after is what your example code would show, except that in the version you uploaded there is no actual code in the magiEvents. What function should I call in the events to move the line?

        Comment


        • #5
          Hi Pearl. Never mind. It's exactly what I'm looking for.

          Comment


          • #6
            No worries, Mike.

            Glad to know it helped.
            If you have further questions, don't hesitate to ask.

            BR,
            Pearl
            Pearl

            Comment

            Working...
            X