This section details the functions and properties of the AMT Repository Module Import interface
| 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> | |||
$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"
}