ImportLibraryItem(destinationNode, nodeClass, libaryName, itemPath, conflictResolutionChoices, preserveTypeDependencyPaths)
テンプレートをプロジェクトにインポートします。
static IUANode ImportLibraryItem(IUANode destinationNode, NodeClass nodeClass, string libraryName, string itemPath, List<TypeConflictResolutionChoice> conflictResolutionChoices, bool preserveTypeDependencyPaths);
引数
- destinationNode(IUANode)
- テンプレートをインポートするプロジェクトノードへのパス。
- nodeClass(NodeClass)
- ノードに対応する C# クラス。
- libaryName(string)
- テンプレートのインポート元のライブラリの名前。
- itemPath(string)
- テンプレートへのパス。パスには、テンプレートの参照名または表示名を含めることができます。
- conflictResolutionChoices(null | List<TypeConflictResolutionChoice>)
- オプションのカスタム競合解決の選択肢。カスタム競合解決の選択肢を定義する方法の詳細については、「TypeConflictResolutionChoice(browseName, nodeClass, resolution)」を参照してください。
- preserveTypeDependencyPaths(bool)
- デフォルトでは、依存関係のあるテンプレートをインポートすると、オブジェクトはインポートされたテンプレートの親ノードに表示されます。ライブラリエレメントのパスを保持すると、テンプレートの依存関係を元のノードにインポートできます。たとえば、[ライブラリエレメントのパスを保持]を有効化すると、[モデル]フォルダーにあるオブジェクトに依存するウィジェットをインポートすると、オブジェクトは[モデル]フォルダーに表示されます。
例
namespace UAManagedCore { public static class TemplateLibrary { public static IUANode ImportLibraryItem(IUANode destinationNode, NodeClass nodeClass, string libraryName, string itemPath, List<TypeConflictResolutionChoice> conflictResolutionChoices = null, bool preserveTypeDependencyPaths = false); } }
ご質問やご意見