基本的なカスタマイズ > ユーザーインタフェースのカスタマイズ > 一般的な UI のカスタマイズ > プリファレンスフレームワーク > プリファレンスマクロ > プリファレンスの取得
  
プリファレンスの取得
プリファレンスツリーを適切なノードに移動してプリファレンスを取得し、特定のユーザーのコンテキストを設定して、そのキーの値を取得します。
例:
// returns an instance of the top node in the Windchill preference
"tree"
Preferences root = WTPreferences.root();
// returns the preference node at that path
Preferences myPrefs = root.node( "/wt/content" );
((WTPreferences)myPrefs).setContextMask
(PreferenceHelper.createContextMask() );
// get( ), gets the value for that
// preference key
String prefValue = myPrefs.get( "fileOperationType", "SAVE" );