LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
russellb

Create a new file type called .lvclasst

Status: Declined

Any idea that has received less than 3 kudos within 3 years after posting will be automatically declined.

This new file type would be a LV Class Template similar to a VI template.  It would copy all of the properties, methods, and inheritance and automatically prompt the user to rename them.  The example below shows a simple lvclass template that could be used as part of a simple sequencer.  This template could be used as a starting place to create the specific step classes called by the sequencer.  Right now this process requires several time consuming manual actions, which would be replaced with the LV template functionality.

Director of Engineering
G Systems, www.gsystems.com
Certified LabVIEW Architect
Certified LabVIEW Embedded Systems Developer
Certified Professional Instructor
GCentral
Download All
10 Comments
crossrulz
Knight of NI

I'm pretty sure this can already be done with the Project Templates.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
russellb
Member

Using the project template would involve creating a new project.  I am looking for a way to create a new class from a lv class template that would be added to an existing project.  My goal is to be able to add new classes from the lv class template during project development.  

Director of Engineering
G Systems, www.gsystems.com
Certified LabVIEW Architect
Certified LabVIEW Embedded Systems Developer
Certified Professional Instructor
GCentral
Intaris
Proven Zealot

I use the option "Save As" to good effect.  Why do we need templates?

AristosQueue (NI)
NI Employee (retired)

> I use the option "Save As" to good effect.  Why do we need templates?

 

For the "filling in the blanks" part -- note that he asked for automatically prompting the user to rename pieces. This is what the Project Templates is designed to do. Do we need to be able to create components within projects? Yes. It'll come along in its own time. We said when we released 2012 that we were going to give it three releases to see how the project templates were used and what feedback we got and then evaluate how to proceed with generating components within a project. I'd guess we'll have something in LV2016 or 2017.

russellb
Member

"Save As" does work, but it only prompts you to rename the class.The lv class template would prompt you to rename the methods as well so you don't have to manually do that as well.

Director of Engineering
G Systems, www.gsystems.com
Certified LabVIEW Architect
Certified LabVIEW Embedded Systems Developer
Certified Professional Instructor
GCentral
kegghead
Member
I'm more interested in the idea of template classes which would have parameterized type(s) that get replaced in the resulting class' private data and methods. Useful in C++, impossible in LabVIEW.
Intaris
Proven Zealot

Right, I get the difference between this and saving as now but do we need a different filetype for this?  Isn't this essentially an IDE feature?  An option to copy and rename a class?  I'm all for the feature but I'm unsure about the filename part.

russellb
Member

AristosQueue it looks like we were posting at the same time so we have similar comments about the "save as", but I am glad you see the need for this type of feature and NI is considering it for future versions of LabVIEW.

 

kegghead are you looking for something like this idea? : C++ like class template

 

Intaris it doesn't have to be a new file type it could be a right click menu called copy. I thought the file type was appropriate because the behavior is similar to the VI template file type.

 

Director of Engineering
G Systems, www.gsystems.com
Certified LabVIEW Architect
Certified LabVIEW Embedded Systems Developer
Certified Professional Instructor
GCentral
AristosQueue (NI)
NI Employee (retired)

If all it is is a VI Template, then Save As is sufficient. But I'm looking at things that require multiple questions to answer. For example, "How many items would you like in the cluster?" that will script code for all N items in some complex algorithm (a la the formal unrolling needed for pipelining on FPGA systems that cannot be implemented with any sort of loop structure). For those, having a type that says "I am not a type at all, I am a procedure that executes to generate a type" makes sense.

 

Intaris: it is the difference between a C# .cs file and a C# .tt file. One is a class. The other is a compile-time executed template that generates one or possibly many classes based on some database table.

Darren
Proven Zealot
Status changed to: Declined

Any idea that has received less than 3 kudos within 3 years after posting will be automatically declined.