When creating a subVI from a selection, LabVIEW should do two things:
It should also try to make the FP of the subVI cleaner, but that's another matter.
A few comments...
* I was the guy who snuck in the change to make connector panes default to 4-2-2-4. This was right after watching an NIWeek presentation on "10 things I hate about LabVIEW". I had the code in place by the end of NIWeek, for the next LV release. Shh, don't tell anybody.
* I forget what release this was, but it must have been one that came out shortly after NIWeek; I remember that it was pretty late in the development process. Tying this into Create SubVI was too risky, I felt. Next release, I thought. There were even calls to remove all my changes until I could also change Create SubVI. I ignored those requests. I hope you agree that the 4-2-2-4 connector pane default is a good change, even without Create SubVI using it.
* I moved on to do other things, and never went back and changed Create SubVI. And nobody else thought it was important enough to implement, either. And that's where your vote on this topic can help. I just voted, and I encourage you to vote, too.
* You can change the default connector pane to be any of the patterns if you edit labview.ini. Adding this to Tools->Options is another idea exchange request that someone has submitted. Vote for that one, too.
My 50cent...Nice idea will make better subvis.
The best implementation for this would probably be for the IDE to call a series of plug-in VIs in sequence. This will allow us to add functionality without changing the NI code.
A couple of points for considerations on this implementation:
1. The plugins might need to be called in a specific order (I haven't thought this through), so they might require a UI for setting this up.
2. The plugins should NOT be required to be members of a class. If they are, all user plugins would break with each new release because the class no longer knows them.
I am all for any improvements to LabView that will make common tasks more intuitive and more streamlined. This is a great idea.
Darrens list of things that could be done automatically is a great start:
- The connector pane change is a no brainer.
- Moving terminals around could easily be automatically done to match common practices.
- For subvis, you could have a front panel cleanup that just puts inputs on the left and outputs on the right, in the order they will be connected to the terminals. This is what I do for subvis because it is quick and clear.
- I dont know why error inputs created are named error out 2, but this is annoying and should be addressed.
- Running diagram cleanup is something I do on smaller subvis, but because it moves stuff around too much i tend to do this selectively rather than just hit the "rearrange my vis" button. I wish block diagram cleanup would just move wires, not vi's, but thats another discussion.
- I dont know about editing the vi icon, but it would be nice if I could define a template that would be automatically applied to the icon. That way its already started for me so i just need to drop a gif and a name.
- I would like to also automatically apply a VI description template where all the inputs and outputs are listed and waiting for a description to be defined for each terminal.
All this stuff is stuff that takes 5-15 minutes of the coder's time every time they drop a subvi. Talk about hours of waste a week. LabView could do it in a blink, automatically. How is that not important enough to implement? Please consider adding this to LabView's next release. Even if its a plugin or something I can install later so I dont have to hear whining from people that dont like it
I support working on Create SubVI. The current behavior makes me sad every time I use it. It should at least be able to put "error in" and "error out" in the appropriate places with the appropriate names.
I agree the 4-2-2-4 is the champ in the best all-around terminal pattern department. That should be used unless the there are so many wires that a higher one is needed.
In support to Michael Aivaliotis contribution, I'd suggest that the Create VI function creates controls that inherit the names of the variables/wire they are fed. It works almost as like that so far (for instance if you connect a control or a wire which has a name, the respective controls will inherit those names).
However, as of LV 2010f2, if you connect a Property Node, the control name will be "Property", not "Control Nameroperty".
For instance, if you create a VI by dropping a sequence and connecting a bunch of "Value" Property Nodes to that sequence, select the sequence and hit "Create VI", the control names will be "Value", Value 2", "Value 3", etc..., which is obviously meaningless.
I'd rather have those controls named "Name_of_Control_1: Value", "Name_of_Control_2: Value", etc. In fact, in the specific case of the "Value" property, I would suggest to drop the ":Value" and give them names such as "Name_of_Control_1", "Name_of_Control_2", etc..., reserving the "roperty" extension to any other properties.
My 2 cts.
Can't edit the previous post anymore to change the "semicolumn-P" into something that does not turn into an obscene emoticon... But you get the idea.
I tried this feature 2011 Beta. Looks good. Much better!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.