Access to object properties of a visualization

2020-11-03
2020-11-05
  • Thomas@Moba

    Thomas@Moba - 2020-11-03

    Hello everyone,

    I have created a rectangle in a visualization in CoDeSys 3.5.

    In the properties I can enter the fixed position (X,Y) under "Position". Now, I want to read out these values in a POU (ST). Attention, I am not talking about absolute motion or relative motion. It should be the actual position, which results when I position the rectangle in my visu. Does anybody know a solution for this?

    Best regards, Thomas

     
    πŸ‘
    1
  • m.prestel

    m.prestel - 2020-11-04

    Hello Thomas,

    right now it is not possible to access the properties of an element in a generic way.

    What would you like to do?

    Best regards,
    Marcel

     
  • Thomas@Moba

    Thomas@Moba - 2020-11-04

    Hello Marcel,

    thanks for you answer!

    I need to calculate a value in relation to the fixed position (X,Y) under "Position" in an visu element. Therefor I want to read out this values in the source code. It would also be nice to get e.g. the "OnClicked" event of an rectangle in a POU without creating an extra variable.

    Best regards, Thomas

     
  • m.prestel

    m.prestel - 2020-11-05

    Hey,

    what value? what are you trying to calculate?

    I don't get what you mean by "without creating an extra variable.".
    You can execute ST code and do anything there.

    Best regards,
    Marcel

     

Log in to post a comment.