This section details the functions and properties of the AMT Repository Module Import interface
| Name | Type | Access | Description |
|---|---|---|---|
| GenSetId | Integer | Read-only | Generation set id resolved for the last ImportFile call (-1 when unresolved). |
| GenSetName | String | Read/Write | Name of the generation set to import into. Defaults to "Default". |
| SkipApplicationOptions | Boolean | Read/Write | Skip loading the Application Options object (<SYSTEM OPTIONS> section) entirely. Otherwise, it is imported as a new revision on each run, even when unchanged; SkipUnchanged does not skip it. Defaults to false. |
| SkipDuplicates | Boolean | Read/Write | Skip an object if its VGUID is already present in the target generation set. This detects reimports of the same export, not objects with matching names or content. Files without VGUID entries, or imports where the target generation set cannot be resolved, cannot be checked for duplicates. Defaults to true. |
| SkipUnchanged | Boolean | Read/Write | Skip an object if its content matches the revision selected by the target generation set, avoiding a redundant revision. The comparison checks layouts and index-table relations, but excludes per-line change metadata, index key sort order, and generated DATE-WRITTEN values. New, locked, branched, labelled, or kind-changed objects are imported as usual. Defaults to false. |
| Function name | Return type | Parameters | Description | |
|---|---|---|---|---|
| Name | Type | |||
| ImportFile | void | FileName | String |
Imports AMT objects from a specified LionSource file into the specified application. The optional LoadAsVersions parameter specifies the revision to load for individual objects. |
| AsAppName | String | |||
| [LoadAsVersions] | IEnumerable<LionImportLoadAsVersion> | |||
Use the LionImportLoadAsVersion class to specify how an individual object is handled during import.
Namespace: Asysco.Lion.Repository.Model.Import
| Parameter | Type | Description |
|---|---|---|
| Kind | LionTreeKind | Object kind, such as Table or Index. |
| Name | String | Object name. |
| Version | String | Version to load the object as, for example "2.1" or "2.3.1". Use NEW to load the object as a new revision, or SKIP to skip it. |
$import = $O_Module.GetReposImport()
$loadAsVersions = [System.Collections.Generic.List[Asysco.Lion.Repository.Model.Import.LionImportLoadAsVersion]]::new()
$loadAsVersions.Add(
[Asysco.Lion.Repository.Model.Import.LionImportLoadAsVersion]::new(
[Asysco.Lion.Repository.LionTreeKind]::Table,
"T_CUSTOMER",
"2.1"
)
)
$loadAsVersions.Add(
[Asysco.Lion.Repository.Model.Import.LionImportLoadAsVersion]::new(
[Asysco.Lion.Repository.LionTreeKind]::Index,
"I_CUSTEMAIL",
"NEW"
)
)
$loadAsVersions.Add(
[Asysco.Lion.Repository.Model.Import.LionImportLoadAsVersion]::new(
[Asysco.Lion.Repository.LionTreeKind]::View,
"CUST_VIEW",
"SKIP"
)
)
try {
$import.ImportFile("C:\AMT\MyFile.LionSource", "ExampleProgram", $loadAsVersions)
} catch [System.Exception] {
"An error occurred"
}