Skip to Content

Automate import model with powershell

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?

Add comment
10|10000 characters needed characters exceeded

1 Answer

  • Posted on Jun 27, 2019 at 09:19 AM


    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.



    Add comment
    10|10000 characters needed characters exceeded

    • 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.