ImportLibraryItem(destinationNode, nodeClass, libaryName, itemPath, conflictResolutionChoices, preserveTypeDependencyPaths)

ImportLibraryItem(destinationNode, nodeClass, libaryName, itemPath, conflictResolutionChoices, preserveTypeDependencyPaths)

Imports a template into the project.
static IUANode ImportLibraryItem(IUANode destinationNode, NodeClass nodeClass, string libraryName, string itemPath, List<TypeConflictResolutionChoice> conflictResolutionChoices, bool preserveTypeDependencyPaths);

Arguments

destinationNode
(IUANode)
Path to the project node to import the template under.
nodeClass
(NodeClass)
C# class that corresponds with the node.
libaryName
(string)
Name of the library from which to import the template.
itemPath
(string)
Path to the template. The path may contain either the browse name or the display name of the template.
conflictResolutionChoices
(null | List<TypeConflictResolutionChoice>)
Optional custom conflict resolution choices. For more information on how to define custom conflict resolution choices, see TypeConflictResolutionChoice(browseName, nodeClass, resolution).
preserveTypeDependencyPaths
(bool)
By default, if you import a template with dependencies, the objects appear in the parent node of the imported template. Preserving paths on library elements allows you to import template dependencies into their original nodes.
For example, with
Preserve paths on library elements
enabled, if you import a widget that depends on objects located in the
Model
folder, the objects will appear in the
Model
folder.

Example

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); } }
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.