Gary Armstrong Posted August 8, 2019 Report Share Posted August 8, 2019 I am implementing a LabVIEW controller for an industrial application (HVAC). My client wants graphics of pumps, tanks, and solenoid valves. I have done fairly well with decorations but now he wants them to change color based on status (on/off). Does anyone supply a graphics library to handle this? Quote Link to comment
ensegre Posted August 8, 2019 Report Share Posted August 8, 2019 (edited) The DSC module has a few of them, but alas, you can easily create better custom boolean controls yourself Here is an example of mine. The pipes, the pump PP1 and and all the valves come from DSC, almost all the rest are customized controls. Edited August 8, 2019 by ensegre Quote Link to comment
drjdpowell Posted August 8, 2019 Report Share Posted August 8, 2019 You can easily customise a standard boolean by swapping out the on/off elements for whatever decoration you want. Then you can colour on and off states differently. Alternately you can use PNG images (already coloured) for the on/off states. Quote Link to comment
Neil Pate Posted August 9, 2019 Report Share Posted August 9, 2019 (edited) You can programmatically colour decorations. The tricky bit is getting a reference to them, as you cannot just look them up by name. What you can do though is figure out their UID and then operate on them by using this number. Whatever you do, don't be tempted to access them via their index position in the Decorations array, the order frequently changes and will cause very subtle coloring bugs in your code! Edited August 9, 2019 by Neil Pate Quote Link to comment
Antoine Chalons Posted August 9, 2019 Report Share Posted August 9, 2019 (edited) 3 hours ago, Neil Pate said: Whatever you do, don't be tempted to access them via their index position in the Decorations array, the order frequently changes and will cause very subtle coloring bugs in your code! Oh yes, I did burn my fingers with that one, I believe you get then sorted on their last modification date or something alike. Edit : oh, and by the way : https://forums.ni.com/t5/LabVIEW-Idea-Exchange/Add-Explicit-Decoration-References-to-LabVIEW/idi-p/975701 Edited August 9, 2019 by Antoine Chalons Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.