From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

G#

cancel
Showing results for 
Search instead for 
Did you mean: 

What new feature would you like to see in G#?

Sounds awesome. For many of LabVIEW users, UML is very convenient for both conceptualizing and documenting the system, so this feature would really help.

Chris Bolin
LabVIEW Partner Program, CLA
0 Kudos
Message 21 of 50
(3,484 Views)

I hope you have seen the class documentation features in G# IDE. If you right-click on a class->G# IDE->Change Description... You have the possibility to change the description of the class and also all the methods. From here you could also export all descriptions to a textfile and change all descriptions (class, methods and controls/indicators) in your favorite text editor, save it and then import it again and all descriptions are updated. This could also be performed on the project level. Right-click on the Project->G# IDE->Export Descritions... Then all descriptions from all classes, methods and their controls/indicators is exported to a txt-file. Edit them all at the same time and then import them again.

Message 22 of 50
(3,484 Views)

When you r-click a function, e.g. Wait, you get a Timing Pallette menu.

Wouldn't it be great if you could r-click any class method and get the methods/class structure as a menu?

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 23 of 50
(3,484 Views)

Yamaeda, you already can. Just create a .mnu for your class using the Palette Editor, then add it to your class and set is as the Default Palette in the Class Properties dialog.

...or are you asking that this all be done automatically in G#? I imagine it would have to be automatically generated when you right-click, because you may have added methods to the class at some point.

David Staab, CLA
Staff Systems Engineer
National Instruments
0 Kudos
Message 24 of 50
(3,484 Views)

I didn't think about your solution, but wouldn't it be good if G# could add/create that at the same time as a method is added to a class?

(i was thinking of a way to script the "check dependancies -> view this vi's class")

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 25 of 50
(3,484 Views)

Hi,

We have actually discussed this internally, but it seems as it isn't that easy to do, since we need access to an internal LabVIEW API that we haven't got today, but I will check again with NI regarding this. This is really something we would like to include in G# Framework if possible. We are looking into it, promise you that.

/Mattias

0 Kudos
Message 26 of 50
(3,484 Views)

Hi,

I'd like G# to be able to support packed libraries.

When creating a packed library out of my own G# classes, the base G#Object class gets compiled into the packed library so that all my classes work, but the G#Object class itself is not exposed. This means that if someone tries to create a G# class that inherits from a class in my packed library, LV freaks out because the parent class is loading in the G#Object VIs that are private to the packed library and the class external to the packed library is attempting to use VIs of the same name but it doesn't have the correct access priveledges since it's not part of the packed library. It turns out to be a big pain.

Next thing I did was compile a packed library where the G#Object was under the library so that it was exposed. Any child classes that inherit from a packed library class is now happy, but the project provider is still linking to the G#Object on disk which I didn't modify and therefore is under a different namespace. This turned into another big pain.

The final solution for me was to create a G#BaseClasses.lvlib library which I placed the G#Object and G#Interface classes in, and I linked all the template classes, G# IDE, etc. so that they were looking for G#BaseClasses.lvlib::G#Object.lvclass and G#BaseClasses.lvlib::G#Interface.lvclass. Then I built the G#BaseClasses.lvlib into a packed library. From there it's easy for my intermediate packed library to link to the G#BaseClasses packed library, and child classes of the packed library can be created from the project provider without breaking any dependencies.

So to summarize, the feature I would like to see is the G# base classes be included under a LVLIB so that they can easily be built into packed libraries.

Regards,

Mike Lyons

Message 27 of 50
(3,484 Views)

Hi,

This is really interesting. We haven't really tested G# with packed libraries, we must admit that. G# is developed in LV2009, where there are no packed libraries, but definetly something we must have a look at to the next release which is planned when LV2011 is released (I guess after NI Week). I must do some investigation of the effects when G# base classes packed in lvlib (backward compability etc.), but I'm sure there is a solution to this. I'm off for vaccation until NI Week, but will have a look at it after that, promise you that.

Thank you very much for sharing this problem with us and also provided this solution to a problem that would occur when packed libraries are more and more used.

Thanks,

Mattias

0 Kudos
Message 28 of 50
(3,484 Views)

Hi Mattias,

I have to admit that working with packed libraries is a real pain. You can replace a library with a packed library in a project and it will update all the references, but there's no way to go the opposite way. That is you can't replace a packed library with a library.

I have a very strong need to use packed libraries because LLBs don't work well with classes, and I'm trying to use G# with NI VeriStand which requires the add-on components to get built into some sort of distributable. I'll try to update this with some usability feedback after I continue to use the packed libaries.

Thanks,

Mike

0 Kudos
Message 29 of 50
(3,484 Views)

It would be nice to have two methods related to serialization: one that is called just after the class is serialized and a second that is called just before the the class is deserialized. This will allow the implementer of the class to do any required steps to get data into a storable format or close references and allow them to recreate (open) references. The base G# Class should provide a default method that can be overridden.

It would also be nice to pass in and out the variant data that would be used during serialization/deserialization so that the variant data can be overridden. This way the programmer can store things like references and DAQmx tasks in the class without having to save them.

If the Variant is overridden during serialization it would be up to the user to perform the deserialization of the variant data (i.e.. empty variant out of deserialize means the user did all the work). Otherwise the default Variant to XML provided by NI may not work and a new method of calculating which element belongs to which control in the cluster. Not impossible, just difficult.

The way I envision the implementation is that the user will create a new Cluster that will contain all data that should be serialzied, he/she will then copy any data from the class that is to be stored to the new cluster and pass it out as a variant and also perform any cleanup required. This variant is then converted to XML by G#. During deserialzation, G# will convert the XML to variant and the user will then convert the variant back to the stored Cluster and copy data back into the class and recreate any references, open files or DAQmx Tasks. The variant out of the deserialize would then be an empty variant and G# would ignore.

The variant in and out of the serialize/deserialize methods are required so that the underlying kernel can call default methods that only pass the variant data thru.

If this sounds familiar, it is because PHP provides this type of functionality and I find it very usefully for stateful programming of web pages that require classes to be saved between sessions.

If an example is needed i could probably conjure something up.

Thanks!

--Brian

Brian G. Shea
Certified LabVIEW Architect
0 Kudos
Message 30 of 50
(3,484 Views)