LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Log.MAN

Project templates

Status: Completed

Available with the Project Templates feature in LabVIEW 2012 and later.

Hi, guys

 

Do you use Templates in LabVIEW?

 

You might have used VI templates in LabVIEW (*.vit).

You might have used control templates in LabVIEW (*.ctt).

 

You might even used VI templates and control templates together.

 

Why can't we create templates for complex libraries like project files or (class-)libraries?

 

For example:

I've created three template VIs which are connected to one control (TypeDef) template.

(The three VIs are for loading, editing and saving the data of the control template to a special kind of data.)

 

014.jpg

 

But using the VI templates will create a separate control (TypeDef) for each VI!

 

015.jpg


If I could put the Templates together in a library or project, It would make things easier,

because LabVIEW 'could' already know about the connection between the two template VIs

and the template control (TypeDef).

 

That's just a simple example which could get much more complex on whole project templates.

 

Until now I have to copy the project template and use it as I need to. It works somhow, but

multiple people using the same template causes much trouble (Someone always forget to create

a copy before changing it Smiley Surprised)

 

So there's the idea. What do you think?

4 Comments
AristosQueue (NI)
NI Employee (retired)

I agree -- having a way to instantiate whole libraries from a starting point easier is something that would be good. I wouldn't want to go the way of .vit and .ctt, however. Templates are a form of copied code, and the more code that gets copied, the greater the maintenance headache. I'd rather see LV spend time working on something more like parameterized templates, where you don't actually instantiate real files from the templates, but you just specify "I'm using this template with the following parameters filled in." That way if the template changes, all code using the template gets updated.

 

As for the "someone forgot to make a copy" problem that you're dealing with today, you should be using source code control and just lock those files so no one can modify them. They'll have to make a copy if they want to check them in.

Log.MAN
Member

Hi, Aristos Queue

 

Thanks for your comment.

 

I like the idea of parameterized templates, it's like a master VI, which updates all VIs that inherits from it.

If it is possible to do something like that in LabVIEW, I would appreciate this.

 

It's true, using a source code control would be a good solution for project templates to not become changed,

but there's a big overhead we don't need (but I appreciate this solution too). Until now, we use "read only" directories.

My idea is an easy way of creating projects, based upon a template project (kind of draft), which contains high level concepts.

My idea is of course just a way of copying an existing project for a new solution.

So, it should not be difficult implementing it right? 😉

 

During development the concepts might change here and there or are completely deleted, because they are

not needed for the particular purpose. So the programmer is free to choose what he need. I support the idea of parameterized templates, but it would bring a big headache if every project is kind of different (I would have to make many parameters to configure).

 

I think my idea could be a part of the solution you mentioned about parameterized templates.

 

Anyway, the template functionalities of LabVIEW until now are kind of cheap and there must be made some enhancements.

PNR
Member
Member

I should mention that there is a solution to this matter. Read: Project Dialog (LabVIEW 2012)

 

It is a bit complex, but it is a solution. However this is for LabVIEW 2012+ only!

I haven't tried yet, but that should solve my problem.

Darren
Proven Zealot
Status changed to: Completed

Available with the Project Templates feature in LabVIEW 2012 and later.