The following lines of code adds a new enum to the selected package, and define two constants for the new enum:
Dim p As RPPackage
Dim c As RPClass
Dim a1 As RPAttribute
Dim a2 As RPAttribute
Set p = getSelectedElement
Set c = p.addNewAggr("Enum", "SampleEnum")
Set a1 = c.addNewAggr("EnumValue", "FIRST_CONSTANT")
Set a2 = c.addNewAggr("EnumValue", "SECOND_CONSTANT")