Gets a list of names for the specified enumeration.

public static IList<object> GetEnumNames( 
Type type 
)

Parameters

type

Type: Type

The name of the Enum type.

Return Value

A list of objects representing the enumeration values.

Many script functions and element properties require the value of a known enumeration (i.e., Enum). For example, the TextAlignment property of a TextBox must be one of: TextAlignment.Center, TextAlignment.Justify, TextAlignment.Left or TextAlignment.Right.

In Design Mode, Property Explorer takes care of the conversion; however, if you need to work with enumeration values in script, you can access the names and values of an Enum by using WV.GetEnumNames, WV.GetEnumNamesAsStrings and WV.GetEnumValues.

To parse a string as an enumeration value, use Parse.

See Selecting Points in Run Mode for a usage example.