Go to: Synopsis. Return value. Related. MEL examples.

Synopsis

setAttrEnumResource(string $nodeType, string $attrShortName, int $enumIndex, string $str)

Convenience routine to define localizable string resource values for an attribute's enumerated values.

Return value

None

Related

loadPluginLanguageResources, setAttrNiceNameResource, setNodeNiceNameResource

Arguments

Variable Name Variable Type Description
$nodeTypestringthe node type
$attrShortNamestringthe attribute's short name
$enumIndexstringthe index associated with the enum value (0, 1, 2, etc.)
$strstringdisplay string

MEL examples

  // Set the attribute enum strings associated with 
  // attribute "md" on node type "myNode".  
  // This example shows English resource values, however this 
  // routine would more often be called in practice to provide 
  // localized string values. 
  // 
	setAttrEnumResource( "myNode", "md", 0, "Disabled");
	setAttrEnumResource( "myNode", "md", 1, "Enabled");