PIImportMode Enumeration
- Last UpdatedNov 18, 2025
- 3 minute read
- PI System
- AF SDK 2024 R2
- Developer
Indicates the type of import to perform when using an ImportXml or ImportCsvmethod.
Since this is a bit mask, several of these values can be set at the same time.
Namespace: OSIsoft.AF
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
[FlagsAttribute] public enum PIImportMode
<FlagsAttribute> Public Enumeration PIImportMode Dim instance As PIImportMode
[FlagsAttribute] public enum class PIImportMode
[<FlagsAttribute>] type PIImportMode
Members
| Member name | Value | Description | |||
|---|---|---|---|---|---|
| AllowCreate | 1 | Import and create new objects. | |||
| AllowUpdate | 2 | Import and overwrite existing objects. This flag cannot be set if the GenerateUniqueNames flag is set. | |||
| GenerateUniqueNames | 4 | Generate unique names for objects that conflict. This flag cannot be set if the AllowUpdate flag is set. If this flag set, then the AllowCreate flag must also be set. | |||
| PasteOperation | 8 | Use user interface Paste Rules to determine when to generate unique names or allow updates. You do not usually specify any other flags when setting this flag. | |||
| AutoCheckIn | 16 | Automatically check in all database changes during the import. This can be useful when importing large files which would be too large to check in all changes. If an error occurs during the import, some changes may have already been checked in and cannot be undone. | |||
| Compatibility | 32 | Internal flag set by the compatibility layer to indicate that the import should abide by AF 1.x rules. In particular, importing a global element into a model will create a reference to the element instead of a copy. | |||
| CreateConfig | 64 | Will invoke the Data Reference CreateConfig option, which allows PI Points to be auto created, as well as having their substitution parameters resolved and server and point id's set. Performance of import will be affected when this option is turned on. Note that this setting will only apply to newly created elements for XML import, but will apply to both new and modified elements for CSV import. | |||
| DeleteOperation | 128 | Delete existing objects. This flag cannot be set if the AllowCreate or AllowUpdate are set. | |||
| CreateCategories | 256 | Automatically add categories that are specified but not found. | |||
| PreserveUniqueIDs | 512 |
If this flag is set during import and the xml or csv source includes the unique ids of the objects,
then each object will retain the ID of the source object (except for PISystem
or AFDatabase objects) when new objects are created. Due to the manner in which
unique ids are selected, it is not possible to preserve unique ids for attributes that are derived
from attribute templates and ports that are owned by transfer objects. Performance
of import will be affected when using this option because extra checks are made to ensure that objects
with duplicate unique ids are not being created.
| |||
| DisableNewAnalysesAndNotifications | 1024 | If this flag is set during xml import, any new analyses or notifications that are created by the import will be created in the disabled state. The import operation will also ignore the specified status values in the xml source for existing analyses and notifications. Their status values will not be affected by the import. |