LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

distributing labview classes

Straight from the LabVIEW help

 

Distributing a LabVIEW Class to other Developers and Users
You can distribute the LabVIEW class you develop to other LabVIEW class developers and LabVIEW class users. You can distribute the class in several ways so choose the manner that most suits your needs. You can use the Application Builder to create a zip file to distribute the class or classes. You also can lock the LabVIEW class before you distribute it to limit the access the LabVIEW class user has to the private data and member VIs. Locking the class can help prevent users from introducing errors in the application.
 

is there any better way to distribute classes rather than just zip files.  The real problem i am seeing right now is from inheritance i can't create LLBs because the overriden methods have the same name. 

0 Kudos
Message 1 of 6
(3,174 Views)

You dont build .llbs, you build .lvlibs.

And I think a .zip or a .lvlib is the best way to provide others with my libraries.

 

Christian

Message 2 of 6
(3,146 Views)

ok so i have a bunch of classes that are created and i created a .lvlib with all of them in there.  Now i guess my question is what do people think is the best way to structure the directories?  I have a class 34405A which inherits from class DMM which inherits from class VISA hardware.  Right now my directory is as follows:

 

-VISA hardware

Visa hardware.lvclass and all its methods

-DMM

DMM.lvclass and all its methods

-34405A

34405A.lvclass and its methods

-HP3478A

HP3478A.lvclass and its methods 

 

This seems pretty straight forward that inheriting classes go under the directory of their parent class.  One thing i have come across already is that if i have a class that doesn't inherit from anything other than object.lvclass (LabVIEWS base object i think) but has a class composed of it then i'm not sure what to do.  Consider this:

 

I have a class IP Power 9258 which inherits from class power strip which inherits from class IP hardware.  This class also is composed of 4 port classes.  This port class does not inherit from anything.  If i follow what i have been doing then the port class would sit next to IP hardware and VISA hardware, but I don't really like how that goes as it would look something like this.

 

-VISA hardware

Visa hardware.lvclass and all its methods

-DMM

DMM.lvclass and all its methods

-34405A

34405A.lvclass and its methods

-HP3478A

HP3478A.lvclass and its methods 

-IP hardware

IP hardware.lvclass and its methods

-power strip

power strip.lvclass and its methods

  -IP Power 9258

  IP Power 9258.lvclass and its methods

-port

port.lvclass and its methods

 

that is my current directory structure and i was curious about how others have managed their classes with inheritance and composition.  I am definitely open to some suggestions!

 

Thanks

 

Brent 

Message Edited by BrentSchenk on 04-24-2009 02:53 PM
0 Kudos
Message 3 of 6
(3,118 Views)

I have just used a folder "Plug-ins" where I keep all of the class code. I have run into issues early on with my structre being too complex. Another reason for keep the classes folders flat is in the event you decide to change your inheritances. I don't want to think (too hard) about what I would have to go through to move everything around and avoid cross linking AND delete the old ones. Smiley Mad

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 4 of 6
(3,113 Views)
So each class has its own folder just next to each other no matter the inheritance or composition?
0 Kudos
Message 5 of 6
(3,099 Views)

Absolutly!

 

inheritance could change- make sure you document the inheirentences though! 

0 Kudos
Message 6 of 6
(3,068 Views)