Get and set coordinates of given element?

pekkallio
2021-01-20
2021-01-27
  • pekkallio

    pekkallio - 2021-01-20

    Is there a way to get and set coordinates of a given element using IEC code?

    "Get" would return the current coordinates. E.g. for line it would be two coordinate pairs.

    "Set" would move the element to the given coordinates. I.e. I would like to move an element to an exact position instead of relative movement to the original position.

     
  • m.prestel - 2021-01-22

    Hello @pekkallio,
    no this is currently not possible.

    There is however the possibility to move an element by Absolute and Relative Movement.

    Best regards,
    Marcel

     
  • pekkallio

    pekkallio - 2021-01-22

    Thank you for your answer!

    Are there any plans to include such feature in the future? I'm familiar with the absolute and relative movement but I'd like to position some components to exact positions using coordinates regardless of their "original" position.

     
    πŸ‘
    1
  • m.prestel - 2021-01-22

    Hey,

    no, there are currently no plans in the near future.
    I noted your request at the respective issue.

    Could you maybe explain to me what you are trying to do?

    Best regards,
    Marcel

     
  • pekkallio

    pekkallio - 2021-01-22

    Hi Marcel,

    I would like to make sure and, if necessary, move elements to exactly correct positions when the PLC starts. I'd like to prevent problems that might occur if some elements are accidentally moved.

     
  • sgronchi - 2021-01-24

    If you use absolute movement and place the objects at 0,0 you can achieve the same effect. But this not solves your problem of "accidentally moving" some elements.

     
  • pekkallio

    pekkallio - 2021-01-26

    Yes, I'm aware of absolute and relative movement. Unfortunately, they don't allow me to define exact coordinates in pixels regardless of the original position of the element.

     
  • pekkallio

    pekkallio - 2021-01-27

    "You want to override project changes during when the runtime is live and the application is running?"

    Yes, in general, I would like to get a more programmatic way to position elements. Also adding elements using IEC languages would be very nice to create more dynamic user interfaces.

    However, I think access control will be the solution for this specific problem.

     
  • m.prestel - 2021-01-27

    Ahh ok, now I understand you.
    You prefer the dynamic approach more ;)

     

Log in to post a comment.