MessageByLabelsCustom Add-In

 
 
 

Note: This refers to an add-in that is unsupported and should be used with caution.

The MessageByLabelsCustom.py add-in creates new messages that use labels as parameters instead of names or IDs. These new messages are registered as: ORIGINALMESSAGENAME_BYLABEL.

The MessageByLabelsCustom.py script is in the extras\Interactive folder of the installation. To use the add-in:

  1. Save the MessageByLabelsCustom.py script file in the directory where your user preferences are stored (usually C:\My Documents\Autodesk Showcase 2012).
  2. Start Showcase.
  3. The script will start and create copies of all id based messages, but that end with _BYLABEL.
  4. You can now invoke any _BYLABEL message that you want.

Example Usage

To rename the alternative labeled 'Metal' belonging to the 'Bumpers' alternative lineup to 'Chrome', call the following message from an HTML interface: ALTERNATIVE_RENAME_BYLABEL:Bumpers,Metal,Chrome.

Using the CONVERT_LABELS message

The CONVERT_LABEL message is defined in the MessageByLabelsCustom.py script and therefore is available only when the add-in is loaded.

The CONVERT_LABELS message calls the specified message after processing the specified fields as labels and converting them into IDs.

The following parameters must be supplied with the a CONVERT_LABELS message.

For example to call the SHOT_PLAY message using shot labels as parameters, call the following message:

  CONVERT_LABELS:'SHOT_PLAY', ( ('Front Wheels','Back Wheels'), True ), (16 + 65536, 0)

The 16 + 65536 value indicates that the parameter is a list of shot labels to be converted to IDs.