Jump to content

Recommended Posts

index.php?app=downloads&module=display&section=screenshot&id=65

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

Link to comment
  • 8 months later...

index.php?app=downloads&module=display&section=screenshot&id=65

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.

Link to comment

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.

post-10515-126926257197_thumb.png

Link to comment

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.

post-10515-126926257197_thumb.png

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.

post-17249-126930675867_thumb.jpg

Link to comment
  • 5 months later...

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

Link to comment

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).

post-10515-044246700 1284581078_thumb.pn

Link to comment
  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.