LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to hide functions or icons from block diagram?

Hello! I want to hide a function or icon in the block diagram but how do I do it? If I can't hide a function, is there a way to overlap the icons between each other to hide it?

0 Kudos
Message 1 of 18
(4,690 Views)

Hi Lamela,

Why would you hide some part of your code ? It makes the code harder to understand and to maintain. Plus it doesn't really make sense to use a fuction if you don't want it in your diagram.

 

By the way, what do you call "hide" ? Can you please provide us with an example of what you are trying to achieve ?

CLAMaxime -- Kudos are a great way to say thank you
0 Kudos
Message 2 of 18
(4,686 Views)

Well, one simple way is to cover the 'offending' article with a text label and set its colour to the same as the background. You can also put stuff in a structure (flat sequence) and then resize the structure so the objects are outside its bounds. But WHY??

 

This has got to be a very bad idea - why purposely make it difficult/impossible to read your own code? Its bad enough when people go hiding front panel controls (though there are a few times when this is necessary for UI functionality, it can be a real pig if it is someone else's code).

 

If you wish to hide functionality from others (for security or IP purposes), you can password protect vis and you can build executables which do not include the block diagram.

0 Kudos
Message 3 of 18
(4,650 Views)

Just for fun...

 

About ten years ago we were playing a game of trying to write code that was hard to understand in labVIEW. It was an attempt to mimc the game played in C where people try to write code that is is impossoble to understand.

 

The game is in this thread.

 

In post #40 I posted an example that will only run in LV 7.1 so don't be surprised if it does not work.

 

I bring it up becuase that entry in the game encoded the binary content of a sub-VI as an array in the diagram. When the VI ran, it wrote the array to disk as a VI and then used VI server to invoke the sub-VI and when completed, deleted the file.

 

Again, I am only sharing that idea for fun and enteratinment.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 4 of 18
(4,575 Views)

I like it! 🙂

 

I'm going to use that in my next project. It'll give those pesky peer-reviewers something to really moan about 😄

0 Kudos
Message 5 of 18
(4,552 Views)

As mentioned, it is a very bad idea to just hide your code.  How will you find it later?  Have you considered using the Diagram Disable Structure?  You can put multiple layers of code in the same place and it will be hidden, yet still accessible if needed.  Color it the same as your background and it is very subtle.  Plus you can always use it for its intended purpose and activate any layer at any time.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 6 of 18
(4,439 Views)

@Ben wrote:

 

I bring it up becuase that entry in the game encoded the binary content of a sub-VI as an array in the diagram. When the VI ran, it wrote the array to disk as a VI and then used VI server to invoke the sub-VI and when completed, deleted the file.

 


Oddly enough I've used that in an actual program. I had to use a freeware executable that was "not corporate IT approved" and didn't want to leave it on disk floating around for them to find and yell at me for.  So, I wrote the binary to disk, called it, and then deleted it.

Message 7 of 18
(4,502 Views)

Waht is the reason for hiding? Do you just want the diagram to look cleaner of do you want to protect your (more or less) intellectual property?

 

If you don't want others to see your diagram, password it.

If the diagram looks too busy, wrap code into subVIs.

 

Hiding code just to confuse is a bad idea. The diagram is for the programmer and it should always be a clear as possible. How many text programmers change part of their code to white text on white background? 😄

Message 8 of 18
(4,468 Views)

I could think of several nefarious reasons to want to hide code on the block diagram... >: )

0 Kudos
Message 9 of 18
(4,434 Views)

@BowenM wrote:

I could think of several nefarious reasons to want to hide code on the block diagram... >: )


... and people look at me funny becuase I refuse to use OpenSource inside secure facilities...

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 10 of 18
(4,395 Views)