Ton Plomp Posted March 20, 2008 Report Share Posted March 20, 2008 This might be a dumb question but how in the world do I: Create a new VI from a VIT that is stored in a palette? While the project has excellent support for this: Right click, New from template. The palette does not have such a function. Please tell me I'm wrong. EDIT: My fastest workaround: Drop VIT onto an empty VI Drag VIT from BD of VI into project Right click projcect, new from template Create template Delete item from project Remove empty VI from memory Ton PS If you are looking for a palette with templates the OpenG, DEAB palette has one: Quote Link to comment
Aristos Queue Posted March 20, 2008 Report Share Posted March 20, 2008 File>> New... (not the same as File>>New VI). Select Browse and choose your template. Quote Link to comment
Ton Plomp Posted March 20, 2008 Author Report Share Posted March 20, 2008 QUOTE (tcplomp @ Mar 19 2008, 07:37 PM) My fastest workaround: Drop VIT onto an empty VI Drag VIT from BD of VI into project Right click projcect, new from template Create template Delete item from project Remove empty VI from memory QUOTE (Aristos Queue @ Mar 19 2008, 08:03 PM) File>> New... (not the same as File>>New VI). Select Browse and choose your template. We don't have palettes for nothing And it doesn't beat my drop, drag, rightclick, delete, delete sequence Ton Quote Link to comment
PJM_labview Posted March 20, 2008 Report Share Posted March 20, 2008 Your method is a good as any (probably the best one out there if you are using the project environement). As far as I know there is not way to instantiate a template from the palette. PJM Quote Link to comment
Michael Aivaliotis Posted March 20, 2008 Report Share Posted March 20, 2008 QUOTE (Aristos Queue @ Mar 19 2008, 12:03 PM) File>> New... (not the same as File>>New VI). Select Browse and choose your template. Stephen, that's not funny. Quote Link to comment
Aristos Queue Posted March 20, 2008 Report Share Posted March 20, 2008 QUOTE (Michael_Aivaliotis @ Mar 19 2008, 03:26 PM) Stephen, that's not funny. Wasn't meant to be. I was trying to be helpful. He wanted a way to instantiate templates without the project window. That's the only way I know to do it. The other possible method is open the .vit and then do Save As:Copy, but that method doesn't duplicate all the subVIs that may be linked templates that also need to be instantiated. Come to think of it, it's a bit strange to me to even have a .vit in the palettes. I guess it would be useful if you build a lot of templates to be able to drop templated subVI calls, but that doesn't seem to be common. Quote Link to comment
Michael Aivaliotis Posted March 20, 2008 Report Share Posted March 20, 2008 QUOTE (Aristos Queue @ Mar 19 2008, 02:35 PM) Wasn't meant to be. I was trying to be helpful. He wanted a way to instantiate templates without the project window. That's the only way I know to do it. The other possible method is open the .vit and then do Save As:Copy, but that method doesn't duplicate all the subVIs that may be linked templates that also need to be instantiated.Come to think of it, it's a bit strange to me to even have a .vit in the palettes. I guess it would be useful if you build a lot of templates to be able to drop templated subVI calls, but that doesn't seem to be common. A representation of the VI is staring right at you in the palettes and you are helpless but to stare right back at it. Such a powerful tool as the palettes and so underutilized. One option (which really only works if the template is not calling other template VI's) is to right click on the icon and select Open VI. Then you can save it as a normal VI. As I mentioned, not practical if the template calls other template VI's. Quote Link to comment
Darren Posted March 21, 2008 Report Share Posted March 21, 2008 QUOTE (Aristos Queue @ Mar 19 2008, 04:35 PM) Come to think of it, it's a bit strange to me to even have a .vit in the palettes. I guess it would be useful if you build a lot of templates to be able to drop templated subVI calls, but that doesn't seem to be common. I agree with Stephen...the established method for creating new VIs from a template is the New... dialog. How many times in a LabVIEW editing session are you guys wanting to create a new VI based on a template that resides in the palettes? Also, instead of the right-click > Open VI method, you can also have the diagram of a VI on the palettes open if you shift-right click to bring up the temporary palette (instead of just regular right-click). -D Quote Link to comment
PJM_labview Posted March 21, 2008 Report Share Posted March 21, 2008 QUOTE (Darren @ Mar 19 2008, 04:48 PM) ...Also, instead of the right-click > Open VI method, you can also have the diagram of a VI on the palettes open if you shift-right click to bring up the temporary palette (instead of just regular right-click)... Can you elaborate on this? I am afraid I did not follow that explanation. PJM Quote Link to comment
Darren Posted March 21, 2008 Report Share Posted March 21, 2008 QUOTE (PJM_labview @ Mar 19 2008, 07:49 PM) Can you elaborate on this? I am afraid I did not follow that explanation. Sorry, I should have been more clear. You know how if you right-click in the diagram to bring up a temporary palette, when you pick something on the palette, it puts the object on your cursor to drop? Well, if you ctrl-right click instead and do the same thing, instead of dropping the object, it opens the panel of the VI (if the object you picked off the palette is a subVI). All I was saying was that it's an alternative to right-clicking on something in the palettes and choosing "Open VI", as was suggested earlier. -D Quote Link to comment
Michael Aivaliotis Posted March 21, 2008 Report Share Posted March 21, 2008 Great tip, I just added it to the Wiki. http://wiki.lavag.org/Tips_and_tricks#Palettes Quote Link to comment
LAVA 1.0 Content Posted March 21, 2008 Report Share Posted March 21, 2008 QUOTE (Darren @ Mar 20 2008, 03:38 AM) Sorry, I should have been more clear. You know how if you right-click in the diagram to bring up a temporary palette, when you pick something on the palette, it puts the object on your cursor to drop? Well, if you ctrl-right click instead and do the same thing, instead of dropping the object, it opens the panel of the VI (if the object you picked off the palette is a subVI). All I was saying was that it's an alternative to right-clicking on something in the palettes and choosing "Open VI", as was suggested earlier.-D Hey ! Nice trick indeed :thumbup: .. How come I didn't see it in the weekly nuggets, did I miss it or did you miss to mention it ? Quote Link to comment
Bobillier Posted March 21, 2008 Report Share Posted March 21, 2008 Hi I have an another trick about menu. You can merge a complete vi (diagram and controls) from controls palette to new vi. That run in 7.0 after i don't know. For this: 1) Edit control palette 2) Select add control 3) But when the selection windows open, go to back and select all kind of files. Now you can see Vi and not only controls. 4) Select one Vi's 5) Save palette. 6) Open a blank vi front panel 7) A from the control palette select the vi you have choose in 4) 8) At this moment all this Vi (contols and diagram) is merge in the blank Vi I wish my explanation is enough clear. I have test with Vit but that not run. But if you rename your Vit in vi and use this trick it's like template because you merge one vi to another. Eric QUOTE (Darren @ Mar 20 2008, 03:38 AM) Sorry, I should have been more clear. You know how if you right-click in the diagram to bring up a temporary palette, when you pick something on the palette, it puts the object on your cursor to drop? Well, if you ctrl-right click instead and do the same thing, instead of dropping the object, it opens the panel of the VI (if the object you picked off the palette is a subVI). All I was saying was that it's an alternative to right-clicking on something in the palettes and choosing "Open VI", as was suggested earlier.-D I have see you can do something like that with another way. When you lock a palette with the pinpen, and right on a vi (in palette) that open a seletion menu where you can choose between open or place the Vi. Eric Quote Link to comment
Darren Posted March 21, 2008 Report Share Posted March 21, 2008 QUOTE (TiT @ Mar 20 2008, 02:02 AM) How come I didn't see it in the weekly nuggets, did I miss it or did you miss to mention it? Good point...I can't believe I never wrote a nugget about this. That situation has been remedied...see http://forums.ni.com/ni/board/message?board.id=170&thread.id=310317' target="_blank">here. -D Quote Link to comment
Rolf Kalbermatter Posted March 21, 2008 Report Share Posted March 21, 2008 QUOTE (Darren @ Mar 19 2008, 07:48 PM) I agree with Stephen...the established method for creating new VIs from a template is the New... dialog. How many times in a LabVIEW editing session are you guys wanting to create a new VI based on a template that resides in the palettes? I never use the New... dialog for VI templates and very rarely for anything else. The way I open instantiated VI templates is simply by double clicking them in Explorer. I guess that is a remainder of pre LabVIEW project times where Explorer was part of my project management, together with a Top Level.vi that contained any and all main VIs and dynamically called VIs. Rolf Kalbermatter Quote Link to comment
Ton Plomp Posted March 21, 2008 Author Report Share Posted March 21, 2008 QUOTE (Aristos Queue @ Mar 19 2008, 10:35 PM) Wasn't meant to be. I was trying to be helpful. He wanted a way to instantiate templates without the project window. I know. I never said I wanted a template without a project. QUOTE (Darren @ Mar 20 2008, 12:48 AM) I agree with Stephen...the established method for creating new VIs from a template is the New... dialog. How many times in a LabVIEW editing session are you guys wanting to create a new VI based on a template that resides in the palettes? Ouch, the forces of NI join. :ninja: Well what if I create a super duper tool (you know real spiffy), and I want to show a great example of the toolkit that can be modified to fit someone's own wishes. I could put the example under exapmles (doh), but someone needs to change the example and resaves the example and can't revert easily. A VIT is IMHO the best way to do this. My reaction on the open VIT and save: If I put this VIT in a palette it is directly connected to the toolkit, but if I open the VIT from the palette (as proposed by Darren and Michael), I get a 'the VIT is already in memory and can't be initiated and the VIT is opened. If I hit save-as I get a regular save as dialog with much to many options, I select 'Open Additional copy' (I think 'substitute copy for original' will do as well). The browse dialog is in the path of the location of the VIT (deep down in the NI folder). Now I have to browse into my location of choice (which would have been directly their if I had opened a new VI from VIT). Way too much work. Ton PS Did I tell I am lazy? Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.