Jump to content

Auto-copy all free-label text on root of diagram to VI documentaion.


Recommended Posts

Very often I find myself copying the documentation I put on the root of the BD (the white background, not inside structures) and pasting it as VI documentaion.

It seems that I could save a lot of time if these comments automatically appered in the VI documentation.

Thoughts;

If there is already text in the VI documentation, then the new free-label text would be added to the end of what is already there, possibly with a header saying "Comments for Block Diagram follow:"

If the there is more than one free label they would be seperated by two CRs to make them easier to read.

If you don't want it to do this automatically, then how about a button on the VI dialog screen that when clicked copies the text?

Another variation would be to add a right-click option to free-lables that woudl copy THAT text to the VI docuemtation?

For LVOOP accessor VIs I'd like to it to add documentaion that reads "Get Y where Z" such that Y= the data element being accessed and Z= documentaion for that value as defined in the class data definition.

Your thoughts and opinions on this idea are welcome.

If y'all think this will save you time, chime in and I'll submit the product suggestion.

Take care,

Ben

Link to comment

This can be done now, using scripting. I'm using a VIPM 2 pre build VI to check the format and presense of VI properties text, as well as block diagram and front panel free label text. Using the private save instrument invoke node would allow you to save the results of an automatic copy/paste routine.

I had thought about using this type of technique in conjunction with other code documentation techniques to provide a way to parse a directory of code for "developer's manual" entries to be able to produce an automatic developer's manual on a project.

Link to comment

QUOTE (neB @ Oct 1 2008, 10:49 AM)

Another variation would be to add a right-click option to free-lables that woudl copy THAT text to the VI docuemtation?

Hi Ben:

I'd vote in favor of the Right-Click on Label option... I think that's and excellend idea which would be a time saver & encourage better vi documentation.

I'm not hot about any wholesale copying of free labels to documentation-- too many of my free labels are labels for adjacent shift registers, notes over wires, notes to myself about things to fix or hooks for future features, and the like. If all that stuff ended up in the VI documentation, it would be counterproductive.

Best, Louis

Link to comment

QUOTE (Louis Manfredi @ Oct 1 2008, 11:22 AM)

Hi Ben:

I'd vote in favor of the Right-Click on Label option... I think that's and excellend idea which would be a time saver & encourage better vi documentation.

I'm not hot about any wholesale copying of free labels to documentation-- too many of my free labels are labels for adjacent shift registers, notes over wires, notes to myself about things to fix or hooks for future features, and the like. If all that stuff ended up in the VI documentation, it would be counterproductive.

Best, Louis

I should add to my previous...

I am not stuck on any of those ideas and methods. I just want to make the documentaion work easier and if Y'all have better/different ideas, please share them.

Ben

Link to comment

Using scripting, you can also add a VI to the Tools menu which will get the Selection List[] property for the current VI, check each element to see if it's a comment, and if it is, add its text to the VI's description. The Comment class does not have an exposed Text property, so you can type cast it to the String class.

Of course, you can also do this as a floating tool which will be open all the time. If you want to save time on some of code, you can lift code from the CCT or the tunnel wiring wizard.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.