09-22-2008 07:24 AM
Once in a while I'll use a VI (perhaps one of mine or one from vi.lib) to do something in an unusual way. How would you document this usage so that when you go back to it some weeks later you don't have to scratch your head wondering why you did it that way? A free label near that VI (or wire) clutters the diagram and gets lost when doing a diagram cleanup (ctrl-U).
I can think of a couple of ways that NI could help us out. One would be to allow me to attach a documentation property to an instance of a VI or wire. This documentation would show up as either a tool tip when you hover the mouse over the object, or in the Context Help window. An indicator would be needed on the VI or wire to let me know that there is documentation available. The indicator may be something that resembles a coersion dot though in a different location so it won't be confused as a coersion dot.
On a related note, I've seen a few diagrams that have transparent labels on top of a wire indicating what that wire does. This is a pretty good kludge to document a wire. Perhaps a label property can be attached to the wire in much the same way as the documentation property I describe above. The label would be visible and automatically displayed on top of the wire. The key difference is that the label would be owned by the wire and could not get misplaced.
- les
09-22-2008 07:31 AM
The last month's or so there was a thread about this topic, so you might consider searching around the forum.
If I remember correctly, one of the ideas was to type-cast the wire with a constant of the same type, but which has a discription set. The type cast woul tell you, that there is documentation available, which will be shown in the tip strip of the wire.
Felix
PS: I think one of the topics discussed in the thread was how to have meaningful names when using dynamic event registration in a (reusable) SubVi.
09-22-2008 07:39 AM - edited 09-22-2008 07:40 AM
Adding to Felix's excellent suggestion...
You can also define documentation for your wires if you want that show up the help when flaoting with the wiring tool.
Ben
09-22-2008 07:52 AM
You can already add documentation to any instance of any node on the diagram, but it just does not show in the CH window.
If you want, you can do something like what I described here, but that also won't help you with the auto cleanup. Personally, I just prefer a free label and not to use auto cleanup at that point.
09-23-2008 02:26 PM - edited 09-23-2008 02:27 PM
I like the way NI documents code in some of their examples. They use small labels with a number or letter in it. Then below is a huge label with explanations of each numer of letter. See the picture:

09-23-2008 02:43 PM
tbob wrote:I like the way NI documents code in some of their examples....
Pssst, tbob. Your text programmer side is showing. ![]()
Ben
09-24-2008 08:06 AM
les,
Another possibility for the unusual use of a VI is to enclose it in a wrapper VI. The wrapper would have the same connector pane and would contain only the original VI. You could than modify the icon and documentation any way appropriate for your application.
Lynn
09-24-2008 11:13 AM
Ben:
Sometimes it is just hard to completely let go of 20 years of text programming. This may sound crazy but I miss the UNIX command line and I still like programming in VB. Of course LV is by far my favorite.![]()
To make this related to the original post, I admire anyone who makes an extra effort to document their VI so that it is self explanatory. I wish everyone would do this.
tBob