LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos
mark.jubay

Main VI flatten feature

Status: Declined
The feature request is fulfilled by saving the VI hierarchy to a .llb which is a single file that carries within it all the VIs on which the main VI depends. The resulting hierarchy gives all of the behaviors that the idea seeks -- a single file where subVIs cannot be individually deleted or forgotten, subVI nodes on diagrams which can still be opened, and complete independence from the original subVI files which may now be edited without affecting the copied VIs in the .llb.

Hi to all, I have a question and can be a suggestion as well for next labview features.

I am a beginner in labview so please provide me information about my question.


Is there a sort of flatten Main VI feature in labview?


What I mean about flatten is that, when I flatten a main vi, all its Sub-VIs will completely be 
its parts. This means that flatten feature will only copy the connection and structures (including its icon) 
inside all the involved Sub-VIs and then integrate it to the main VI as its main parts. This flatten feature
should not affect the original sub-VIs and their location in the directory, but just copy their structures and connections
for the purpose of removing all the Sub-VI dependencies connected to it(I mean not anymore actually access the sub-VIs located in different directories).

I am thinking that, after flattening the main VI, still the sub-VI icons are still there with all its connections and structures inside (nothing has changed),
only that, we do not anymore access it to somewhere because it is completely copied during flatten action. This can provide advantages like we are not
anymore dependent on the sub-VIs. Whenever some sub-VIs have been deleted on the accessed directories, we are not anymore troubled about missing
files and errors because our main VI itself is complete or independent. But as a reference to where we copied the flattened Sub-VI, atleast we are given
that information where they are located.


The disadvantage is that, we increase memory consumption, since we actually created at most two entities (one independent and the other).

I am suggesting that NI will include this an option/feature in labview, incase there is none. This provides a Main VI to be more compact and
free from all sorts of Sub-VI dependencies. This is just an option though, just to provide more versatility to wide range of users.
I mean, depends on user preference.

 

THANKS 🙂

9 Comments
RavensFan
Knight of NI

How does a feature like you propose make the Main VI "more compact" if it is going to blow up from all the code in the subVI's being jammed into the diagram.  What is wrong with subVI dependencies?

 

You make is sound like you are somehow improving your main VI, when the end result is going to make things worse.

mark.jubay
Member

please check my updated post, it may answer your comment in case I got your point correctly.

thanks

mark.jubay
Member

Having a flattened Main VI allows you to edit the inside structures incase necessary without affecting the original ones.
When you make an edit inside the flattened Main VI, all changes occurs only inside it. Thus you can always go back
to the orignal ones if you want to. You can edit and flatten again incase you used sub-VI during edition. The goal is that,
when the code is complete and flattened, the main VI can stand alone. You can always have choice when you do not
want it that way.

RavensFan
Knight of NI

Okay.  Now that makes a little more sense.

 

Actually, it seems very similar to Allow Hide/Unhide of code inside Block Diagram, without using SubVI

 

PS:  "during edition"??  Do you mean "during editing"?

mark.jubay
Member

I mean "editing", 🙂 sorry.

I'll check it.

 

Thanks.

tst
Knight of NI Knight of NI
Knight of NI

I think that what you want to do is wrong (if you want to protect your source code, use source code control), but if what bothers you is the possibility of changing dependencies, LV does already have a feature which can help you - the source distribution, which creates a copy of a VI with all its dependencies. The VI still calls subVIs, but these subVIs (and the main VI) are now copies of the originals.

 

I haven't created a source distribution in years, but in the past they would be an option in the save as dialog. These days I think you need to configure them as a build spec in a project, but you might still also be able to do this from the save as dialog.

 

Another alternative is to build an executable - that way you are completely protected from any changes in the source code.


___________________
Try to take over the world!
JÞB
Knight of NI

@Yair, "Save As>> Duplicate Heirarchy to a new location" Does still exist. 

 

A Source Distribution would be better.  Better still would be a Project Template.  Either of these allows for the additional protection of selectively prepending a name decoration to prevent name collisions (Although-if two decorations are the same you are back in the fire.)

 

Also, I encourage all reading this to look into how *.lvproj and *.lvlib  files can be used to help implement these features Especially, "Private" members of *.lvlib files.  I think that in essence, Mark's concerns may allready have implementations in the current IDE.


"Should be" isn't "Is" -Jay
JordanG
NI Employee (retired)
Status changed to: Declined
The feature request is fulfilled by saving the VI hierarchy to a .llb which is a single file that carries within it all the VIs on which the main VI depends. The resulting hierarchy gives all of the behaviors that the idea seeks -- a single file where subVIs cannot be individually deleted or forgotten, subVI nodes on diagrams which can still be opened, and complete independence from the original subVI files which may now be edited without affecting the copied VIs in the .llb.
JÞB
Knight of NI

J,  There are so many better ways than a *.llb that have been developed since the *.llbSmiley Sad


"Should be" isn't "Is" -Jay