Francois Normandin Posted July 3, 2009 Report Share Posted July 3, 2009 Name: LVClass API Submitter: François Normandin Submitted: 03 Jul 2009 File Updated: 15 Sep 2010 Category: LabVIEW OOP Version: 1.0.2 LabVIEW Version: 8.5 License Type: Creative Commons Attribution 3.0 Copyright © 2008, François Normandin All rights reserved. Author: François Normandin --see readme file for contact information. Description: This code is provided to help manage labview classes. By opening a reference to a lvclass file, this API allows easy access to Private Data Cluster, Description, Class version, Icon, Tags, Class Items List, Ancestor Hierarchy, Addition and removal of files to the class, Copying and saving classes. It can be the basis for cloning a class, applying standardized icons to all VIs in the class, accessing tags and descriptions or to follow different versions. Dependancies: oglib_file-2.8 Change Log: 1.0.0: Initial release of the code. 1.0.1: Correction of installer code (second copy operation reversed) 1.0.2: Expose "Element (Build)" to Connector Pane in "IncrementClassVersion.vi" Known Bugs: 1- The "Close.vi" uses a merge error with the first error from a close reference. This will discard any error on input to the VI if there is an error from the close reference. Click here to download this file Quote Link to comment
chcastro Posted March 22, 2010 Report Share Posted March 22, 2010 Name: LVClass API Submitter: LAVA 1.0 Content Submitted: 03 Jul 2009 Category: LabVIEW OOP LabVIEW Version: 8.5 Version: 1.0.2 License Type: Creative Commons Attribution 3.0 Potentially make this available on the VI Package Network?: Undecided Copyright © 2008, François Normandin All rights reserved. Author: François Normandin --see readme file for contact information. Description: This code is provided to help manage labview classes. By opening a reference to a lvclass file, this API allows easy access to Private Data Cluster, Description, Class version, Icon, Tags, Class Items List, Ancestor Hierarchy, Addition and removal of files to the class, Copying and saving classes. It can be the basis for cloning a class, applying standardized icons to all VIs in the class, accessing tags and descriptions or to follow different versions. Dependancies: oglib_file-2.8 Change Log: 1.0.0: Initial release of the code. 1.0.1: Correction of installer code (second copy operation reversed) 1.0.2: Expose "Element (Build)" to Connector Pane in "IncrementClassVersion.vi" Click here to download this file Hi Mr François, Your API is helping me in a graduation work about LabView classes. In fact I am trying to generate LV classes from a UML class diagram exported to XMI file. Using your API I can access the class's control cluster and using scripts I can drop the attributes. Actually I just drop the controls because I can not get the reference of the cluster. If I move the control over the cluster with the mouse it is absorved by the cluster. Have you a tip how to get the reference of the cluster? Your VI returns references to the class and to what I guessing should be the cluster but property node reports as VI reference. Thanks, Cláudio H. Quote Link to comment
Francois Normandin Posted March 22, 2010 Author Report Share Posted March 22, 2010 Your VI returns references to the class and to what I guessing should be the cluster but property node reports as VI reference. Hello Claudio, Nice project you've got! I hope your graduation work can be shared on LAVA when you're done! The API returns the reference to the class and the reference to the private class control VI. You've got to think of that .ctl as just another VI with no block diagram. Hence, you can get a reference to anything on the front panel of that VI. Get a reference to the front panel of that control VI and extract the reference of the controls. There is always only one control, so the first element of the array is the reference to your private data cluster. Quote Link to comment
chcastro Posted March 23, 2010 Report Share Posted March 23, 2010 Hello Claudio, Nice project you've got! I hope your graduation work can be shared on LAVA when you're done! The API returns the reference to the class and the reference to the private class control VI. You've got to think of that .ctl as just another VI with no block diagram. Hence, you can get a reference to anything on the front panel of that VI. Get a reference to the front panel of that control VI and extract the reference of the controls. There is always only one control, so the first element of the array is the reference to your private data cluster. Hello François, Thanks, I hope it could be accepted here. I follow your sample code and manage to insert the controls in the private data. Thanks for you help and kind words. Quote Link to comment
Shawn Walpole Posted September 15, 2010 Report Share Posted September 15, 2010 Hello François, Thank you for providing this API. I am using it to test a proof-of-concept of saving LVClass data in an ini file. The LVClass API has been very easy to use because of the excellent documentation, nice icons, and a well thought out palette layout. I did have 2 questions: 1) The "Close.vi" uses a merge error with the first error from a close reference. This will discard any error on input to the VI if there is an error from the close reference. Is this intentional? 2) There is a password protected VI "Get_Class_Hierarchy_From_disk__ni.vi". Did this VI come from NI? I am curious where you got it from; I couldn't figure out how to get this information and was happy to see this VI in your API. Thanks, Shawn Walpole Quote Link to comment
Francois Normandin Posted September 15, 2010 Author Report Share Posted September 15, 2010 Hello François, Thank you for providing this API. I am using it to test a proof-of-concept of saving LVClass data in an ini file. The LVClass API has been very easy to use because of the excellent documentation, nice icons, and a well thought out palette layout. I did have 2 questions: 1) The "Close.vi" uses a merge error with the first error from a close reference. This will discard any error on input to the VI if there is an error from the close reference. Is this intentional? 2) There is a password protected VI "Get_Class_Hierarchy_From_disk__ni.vi". Did this VI come from NI? I am curious where you got it from; I couldn't figure out how to get this information and was happy to see this VI in your API. Thanks, Shawn Walpole Hi Shawn, 1) Oops. Totally unintentional. I'll swap the error inputs in next version and post a comment in the online documentation (known bugs). 2) Yes it comes from NI. I think it was posted on LAVA before the LAVA1.0 crash. Since scripting is released, you can do it without this password encrypted VI. Use the private method "Parent Class" and call recursively until you hit the cube object (no more parent references). Quote Link to comment
crelf Posted November 1, 2010 Report Share Posted November 1, 2010 Looking for the posts on Saving LVClass data to an ini file? They're over here. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.