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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

rename a lvclass programmatically

Salut.

Is it possible to rename a lvclass inside a lvlib programmatically?
0 Kudos
Message 1 of 7
(3,255 Views)
Are you trying to rename the class, or an instance of the class?  For example, are you trying to change the name of the class from class Dog -> class Cat.  Or are you trying to change an instance, like Dog Fluffy -> Dog Kujo.
Brian K.
0 Kudos
Message 2 of 7
(3,234 Views)


@Brian K. wrote:
Are you trying to rename the class, or an instance of the class?  For example, are you trying to change the name of the class from class Dog -> class Cat.  Or are you trying to change an instance, like Dog Fluffy -> Dog Kujo.


Both
0 Kudos
Message 3 of 7
(3,230 Views)
Hi Jacemdom,
 
Well I know you can change the name of an instance by making a name property, and making the according get/set methods for the property of name in instance.  I have been trying to programmatically change the name of lvclasses, but I do not think there are properties or methods that give you access.  To be honest, I do not think it is wise to change the name of a class, because it will cause the decedents of the class to loose connection to their parents.
 
Why exactly are you trying to accomplish this, because there ma ultimatily be an easier answer?
Brian K.
0 Kudos
Message 4 of 7
(3,207 Views)
Here is what i want to do programmatically in more details, i can do it manually in the environment.
 
I have a class contained in a lvlib and i want to:
 
1- Do a save as copy on the lvlib with the option add copy to .lvproj
2- Do a rename on the contained class
0 Kudos
Message 5 of 7
(3,189 Views)
This seems perfectly possible, but you might try using a different method than you would if you did it manually in the Project Explorer window itself.

Try this:

  1. Do a Save Copy on the LabVIEW Library.
  2. Do a Save Copy on the LabVIEW Class Library inside your new LabVIEW Library.
  3. Add this new Lvclass reference to the new LabVIEW Library.
  4. Delete the reference in the new library to the old class.
  5. Open a reference to the project you want and add the new LabVIEW library to the project.

Message Edited by Jarrod S. on 06-03-2007 03:23 PM

Jarrod S.
National Instruments
0 Kudos
Message 6 of 7
(3,169 Views)
Smiley Happy
0 Kudos
Message 7 of 7
(3,129 Views)