ジャンプ先: 概要. 戻り値. 関連. MEL 例.

概要

getPluginResource(string $pluginName, string $lookUpKey)

プラグイン名と固有のリソース ID を前提にプラグイン文字列リソースを検索します。

ルックアップ キーは固有にしてください。プラグイン名とルックアップ キーは、ともにリソースを固有に特定するために使用します。

プラグイン スクリプト リソースは、registerPluginResource コマンドを使用して登録と初期化します。オプションで、setPluginResource を使用して、ローカライズした値でオーバーライドすることもできます。

戻り値

string: キーに関連する文字列リソース値です。キーが見つからない場合、戻り値は空です。

関連

loadPluginLanguageResources, registerPluginResource, setPluginResource

引数

変数名 変数タイプ 説明
$pluginNamestring固有のプラグイン名です。
$lookUpKeystringこの文字列リソースの固有のキーです。

MEL 例

  // Query the value of a menu item's label and use it

  // to set the string.  

  // The plugin name is "myPlugin" and the resource name 

  // is "showBBoxLabel"

  // 

  string $mLabel = getPluginResource("myPlugin", "showBBoxLabel");
  menuItem -l $mLabel;