04-26-2009 11:06 AM
Hello,
I know how to return the image of a front panel or diagram using VI server however I'm looking to be able to return the same image as displayed within the 'Data Type of Wire' information in the Context Help window when I hover my mouse over a wire. I thought this may be achieveable by returning a reference wire to a Front Panel Control and then maniulpate the methods/properties of that to try and return it but I can't find anything that will do the job. . .
Im asking because I have an object that stores another set of differenet objects and hovering over the highest most class returns a good diagram to show all of the data memebers within the system.
Any ideas on how to get programatic access to that image?
Cheers
Tom
04-26-2009 01:25 PM
anintern-
GREAT question! (kudos!) But I believe you missed a really important point about LabVIEW! I admit, I got sucked into the question and started to look for an answer too THEN I remebered - NOTHING on the block diagram is compiled! The Block diagram exists in a graphical programming language to give the developer an idea of how the program is compiled (OOFDA!) In fact you can remove the block diagram and run the compiled code (makes it hard to edit though
) Athough NI has done wonders to make it look like wires are real objects in the development and debug modes of operation the code that really runs contains no wires. You can hover and get info- but only within the development enviroment.
Regardless of the above- You might be able to generate an interactive SIMULATION of the block diagram by placing a printout of a BD as a picture control in a new sub vi front fanel and re-creating the events that you want to trigger a help dialog (and linking to the LabVIEW help pages. IDK but this seams possible using "Control Help Window.vi" and "Control online help.vi" on the Help vi pallet.
04-29-2009 03:47 AM
Hi,
Can I ask why you would need to do this? You would not be able to see your front panel AND hover over things on the block diagram unless you used Ctrl+T to have them side by side. Are you distributing the application? As an executable you would not be able to see the block diagram at all.
Thanks,
04-29-2009 04:28 AM
I think you guys missed the point of the original poster.
When you hover over an LVclass wire, you see the content of the class cluster in the context help window. If the class includes other instances of other classes in its cluster, those classes are also displayed in the context help window.
Tom wants to get that picture. The problem is that what you're seeing is not a preset picture. It's probably a tree which is dynamically generated when you hover over the wire and is probably done in the C code with no visible interface in LabVIEW (definitely not a public one).
I can think of a couple of option:
1. The easy one is probably to programmatically open the CH window, position the mouse over a wire of your class (will require some access to private properties. Look at LAVA forums scripting forum to see how you can access these), and then capture the entire screen and cut out the part of the image which has the CH window.
2. The somewhat harder one is to rebuild this yourself. There's a class API in the LAVA forums code repository which should return the structure of the class. You can use that to recursively parse the cluster and build a tree of all the elements.
Why do you want to do this?
04-01-2010 03:07 AM
Guys,
I wanted to return this to use within a presentation and documentation about the system I was developing. I was aiming to show visually the need for using a OOP approach by letting people visually understand the complexity within that system.
It would be nice if a function within VI server could deliver some of the context help BMPs when a control reference is wired. We know the functionalities there, just needs exposing in a public class.
Cheers
Tom
04-01-2010 03:31 AM