04-21-2009 09:24 AM
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.
04-22-2009 08:02 AM
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
04-24-2009 02:52 PM - edited 04-24-2009 02:53 PM
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
04-24-2009 03:02 PM
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.
Ben
04-24-2009 04:43 PM
04-25-2009 03:15 PM
Absolutly!
inheritance could change- make sure you document the inheirentences though!