08-10-2009 01:23 PM
Hi,
I'm using vi scripting to generate code for a user. I was wondering how I can programmatically annotate the code in the block diagram and front panel so the user understands it better.
Thanks.
08-10-2009 06:57 PM
(recanted in favor of a superior answer below)
08-11-2009 07:32 AM
You can create free labels fairly easily. Here is a snippet and a LabVIEW 8.6 version. You will want to do some positioning to get the labels in the right spots. That is usually the most tedious part.
08-11-2009 09:09 AM
The New VI Object primitive has the ability to drop objects relative to other objects. There are several things you can wire to the "relative position/next to" input on the New VI Object primitive:
This third style will make it much easier to drop labels next to other objects. Here is a modified version of DFGray's code. Notice the cluster that is wired into the second New VI Object.
There are some typedefs to make creating this cluster easier but I think we forgot to ship them with scripting. I'll look into seeing if we can get those out somehow (or in a future release). Until then, you can create these clusters by hand. Be sure to copy the relative direction enum around.