[Solved] Displaying Object Properties to Visualisation

michaelADE
2018-10-31
2018-11-05
  • michaelADE - 2018-10-31

    Hey Everyone,

    So I have been working on some object orientated design recently and have got the structure working pretty well. However when it came time to start displaying some of the variables to the screen I realised that I cant call the objects property (setter/getter) from the visualisation as i get the error message 'obj.Name' is not allowed as an operand of ADR.

    I can get around this as from the visualisation I have direct access to the internal variable (sName) however I have concerns with this;
    1. My property obj.Name is a get method only so it should be able to be edited aside from within the object, however accessing the variable directly from the visualisation means that this variable could be edited from the visualisation if not careful with the setup.
    2. For a lot of my objects I have multiple classes implementing from the same interface and there is often only one of these classes being actively used at any time, so I call an interface variable which contains a reference to the active object. This works well on the coding end, however this interface doesn't contain any internal variables so as such i cant access any properties or variables of this 'active' object.

    So my question is, is there a way to access object properties from the visualisation, or some other solution I could use to display values from an interface.

     
  • m.prestel - 2018-11-02

    Hello sir,

    as far as I understand it you want to activate the property handeling for all element properties.

    See https://help.codesys.com/webapp/_cds_dl ... n=3.5.13.0 for more!

    Best regards,
    Marcel

     
  • michaelADE - 2018-11-05

    Hey Marcel,

    Thankyou so much for your reply, that was exactly what I was looking for.

     

Log in to post a comment.