Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

How to change visualization size, or initiate automatic detection at runtime?

sternberg
2020-04-07
2020-04-08
  • sternberg - 2020-04-07

    Is it possible to change the size of a visualization in ST code like done manually in Dialog Properties of Visualization Objects?

    Or, how to reinitiate automatic detection of visualization size.
    Can a visu init be triggered somehow?

    This is necessary after elements of a frame visu have changed size, or else they will be cut off and/or the scrollbars will not work correctly.

     
  • m.prestel - 2020-04-08

    Hello @sternberg,

    No, the size of the visualization will be determined during download.

    Could you please describe your use case a bit for me? What are you trying to do?

    Best regards,
    Marcel

     
  • sternberg - 2020-04-08

    Hi Marcel, thanks for your answer.

    I want to visualize the temporal sequence of a process in a frame visualization.

    The user can create and change the process at runtime.
    The process steps are represented by visu elements that change their size according to their duration.
    The process duration is expected to be in a wide range.

    So, i suppose, a way to achieve this would be:
    Make the visu big enough to fit the longest expected process to avoid cutting off elements.
    Then write custom scrollbar functionality that takes into account the actual duration of the process, instead of using the built in frame scrollbars, right?

    Any other ideas, or tips?

     
  • m.prestel - 2020-04-08

    Hello @sternberg,

    how about having multiple visualizations referenced in the frame which support the different expected process lengths?

    Best regards,
    Marcel

     
    πŸ‘
    1
  • sternberg - 2020-04-08

    Yes, thanks @mprestel, nice tip.

    Here is what i am planing to do:

    For the initial view:
    Scale down the whole process to fit the frame without scrollbars.
    Then offer the possibility to zoom in three times, which would double the displayed process-size each time.

    This will change the referenced visualization to one that is double, four times and 8 times the size of the initial one.

    In that way i can use the built in scrollbars - and the process will always exactly fit the visualization, no matter of what duration it actually is.

     

    Last edit: sternberg 2020-04-08

Log in to post a comment.