# RENAME CLASS Change Name of Class

> Source: https://manual.pvxplus.com/directives/rename-class

## Format

**RENAME CLASS** *old_name$* **TO** *new_name$*

***Where:***

|  |  |
| --- | --- |
| *old_name$* | Previously defined class to be renamed. |
| *new_name$* | New name for the class. |
| **TO** | Mandatory keyword, not case sensitive. |

## Description

The **RENAME CLASS** directive is used in **[Object Oriented Programming](https://manual.pvxplus.com/pxplus-user-guide/object-oriented-pxplus/introduction)** (OOP) to alter the name of a previously defined class. This functionality allows the application designer to alter an existing object class easily without having to change programs.

## See Also

**[DEF CLASS Define Object Class](https://manual.pvxplus.com/directives/def-class)**  
**[DROP CLASS Delete Class Definition](https://manual.pvxplus.com/directives/drop-class)**  
**[DROP OBJECT Delete Object](https://manual.pvxplus.com/directives/drop-object)**  
**[FUNCTION Declare Object Method](https://manual.pvxplus.com/directives/function)**  
**[LIKE Inherit Properties](https://manual.pvxplus.com/directives/like)**  
**[LOAD CLASS Pre-Load Class Definition](https://manual.pvxplus.com/directives/load-class)**  
**[LOCAL Designation of Local Data](https://manual.pvxplus.com/directives/local)**  
**[PROGRAM Create or Assign Program File](https://manual.pvxplus.com/directives/program)**  
**[PROPERTY Declare Object Properties](https://manual.pvxplus.com/directives/property)**  
**[STATIC Add Local Properties at Runtime](https://manual.pvxplus.com/directives/static)**  
**[NEW( ) Create New Object](https://manual.pvxplus.com/functions/new)**  
**[REF( ) Control Reference Count](https://manual.pvxplus.com/functions/ref)**

## Example

If you had an existing application with a Product class object but needed to add a new field to the object such as Lot_Number:

```
rename class "Product" to "Orig_Product"
def class "Product"
like "Orig_Product"
property Lot_Number
end def
```

All subsequent uses of a Product class object would be identical now to the standard Product class and have the property Lot_Number.
