cancel
Showing results for 
Search instead for 
Did you mean: 

Automate import model with powershell

former_member616611
Discoverer
0 Kudos

I need to be able to import a model from an Excel file in PowerDesigner and this I have to automate so that it is launched from the command line, via powershell. I have seen that there is a FILEIMPORT method but I can not import the file and it does not return any type of error.

How could I do it?

Accepted Solutions (0)

Answers (1)

Answers (1)

Ondrej_Divis
Contributor
0 Kudos

Hi,

you don`t even need Powershell to do that. You can launch pdshell16.exe either with parameter -r or -x and give him the path to the *.vbs script, which will run the functionality for importing metadata from excel. Here you have two options:

  1. You will call the method for importing in the standard ExcelImport extension (but you have to stick to the data structure required by ExcelImport extension)
  2. You can import data in any structure from excel, but you will have to script all the import logic by yourself.

I did both ways many times and I recommend the first option, if you have the possibility to modify the excel structure to fit the ExcelImport extensions` needs.

Regards,

Ondrej

GeorgeMcGeachie
Active Contributor
0 Kudos

The standard Excel import wizard is designed to cope with (practically?) anything, so there is a lot of conditional logic which will slow it down if you have large volumes of metadata to import. In the import options you can switch off "Check data integrity", which will speed it up, but a custom script will be much faster, better suited to large volumes.

Ondrej_Divis
Contributor
0 Kudos

I agree with George. Using ExcelImport means less work with scripting, but the runtime might be slower, on the other hand, custom script can be a better choice for different excel structures or large data volumes in some cases.