Jump to content

A comment box


Recommended Posts

In text based languages like c it is possible to comment out code so that it does not execute.

This would be a box on the block diagram, like a case structure that code could be placed inside and it would not execute or compile. A program would run if broken code were inside the comment box and operations like control B would not affect it.

Code could be cut and pasted to and from the comment box.

It would be different from a case structure in that broken code inside the comment box would not prevent the program from running.

Link to comment
  • 2 weeks later...

Actually, this is already available however it has only been released for the LabVIEW PDA module and the LabVIEW FPGA module. I'm not sure why it has not been released to the windows platform.

I have attached a VI with this structure. You should only use it if you are running PDA or FPGA module since it is NOT a supported feature for other platforms. Use at your own risk!

Download File:post-14-1086500298.vi

Link to comment
  • 3 months later...

I have seen and tried to use this before. Sometimes it worked fine and in other areas it did not let me run my code. I had a snippet of code that I wanted to comment out, and the coditional worked fine for that. When I commented out a non-executable VI, the diagram looked like it compiled (good run arrow) but I could not run the VI, it errored on execution.

Too bad, since this would be a very good feature to have to share sections of the same VI that is being worked on by more than one person.

Mike

Link to comment
I have seen and tried to use this before. Sometimes it worked fine and in other areas it did not let me run my code. I had a snippet of code that I wanted to comment out, and the coditional worked fine for that. When I commented out a non-executable VI, the diagram looked like it compiled (good run arrow) but I could not run the VI, it errored on execution.

Too bad, since this would be a very good feature to have to share sections of the same VI that is being worked on by more than one person.

Mike

1935[/snapback]

I have heard that the "Conditional Disable Structure" does not work for blocks of code that call subVIs. Maybe this is why you ran into problems, on occasion.

Link to comment
I have heard that the "Conditional Disable Structure" does not work for blocks of code that call subVIs.  Maybe this is why you ran into problems, on occasion.

1989[/snapback]

This is correct. The program won't compile if there is an uncompileable subVI listed in the Disable structure. Since LabVIEW partially doesn't 'see' the subVI though, there are no errors in the error box that comes up when you try and run... just a blank box and a broken arrow until you remove the offending subVI or get it working so it can be compiled. Otherwise, you can place all the non-compileable code you want in a Disable structure and the program will run, just so long as it doesn't contain non-working subVI's.

Link to comment
  • 3 months later...

Commenting out non-working subVIs (and whole trees below them) is exactly what we sometimes need during development of large projects.

It would also be nice if we had a Find/Enumerate option that would show us all the places that had Comment Blocks and manage them selectively or as a whole. Hmm, maybe some of the new scripting stuff...

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.