I have a Ignition project that has both a vision and perspective aspect to them. They share some business logic functions. I would like it if I could craft a print function that would handle printing if it was in vision or perspective, given one I have to use
system.perspective.print. Has anyone figured out a way to do this?
Basically I want something like
def print(message, ???): if ???: print message else: system.perspective.print(message)
but I can’t think of a way for this print function to “know” if things are being called from perspective or vision, except for passing some parameter, which I would then have to include for every single function that wants to print. Any ideas how I can figure out the scope of what is calling what function so that I can print regardless?