Join us today!

Notifications
Clear all

Auto Generation of Getters and Setters?

3 Posts
2 Users
2 Reactions
596 Views
Posts: 20
Topic starter
(@adam-haney)
Eminent Member
Joined: 2 years ago

Aho Young Warriors!

 

I am working on a project that has a large number of Properties for access of internal Class data. 

Does anyone know of an automatic way to generate getters and setters, even if it doesn't auto-complete the code to map the Property variable to the internal Class variable? I would be open to a solution that just automatically removes the need to right-click 'Add Property'.

Thank you all for any help provided.

Reply
2 Replies
2 Replies
twinControls
Admin
(@twincontrols)
Joined: 2 years ago

Member
Posts: 114

@adam-haney 

Hi , you'd need to use python or something else to automate this. You can open the .TcPOU file of the POU you need and handle adding the get/set in your python script. 

 

get set

 

TcPOU file
Reply
(@adam-haney)
Joined: 2 years ago

Eminent Member
Posts: 20

@twincontrols 
Thank you for the feedback. I'm not ready to go down that path, but I appreciate the feedback.

Reply
Share: