I have managed to open my EA project via the automation API, but don't know the right format in which to pass the arguments to the ImportDirectory(…)
method:
var repo = new EA.RepositoryClass();
repo.OpenFile("some.eap");
var proj = repo.GetProjectInterface();
string language = "..."; // what to put here for C#?
string extraoptions = "..."; // what to put here for my option (see below)
proj.ImportDirectory("{C5007706-B7DA-4ACC-9123-F934F9B60305}", language, "C:\somedir", extraoptions);
When doing the import manually I select the following options in EA's Import Source Directory window:
What is the equivalent translated to string arguments for the ImportDirectory(…)
method?
In Python, arguments are passed to a script from the command line using the sys package. The argv member of sys ( sys. argv ) will store all the information in the command line entry and can be accessed inside the Python script. Python's getopt module can also be used to parse named arguments.
append() Function. This is the easiest way to import a Python module by adding the module path to the path variable. The path variable contains the directories Python interpreter looks in for finding modules that were imported in the source files.
Universal naming convention (UNC) paths, which are used to access network resources, have the following format: A server or host name, which is prefaced by \\ .
EA Support told me that all the values listet in "the Source Type" dropdown on the "Import Source Directory" dialog can be used as arguments for the language parameter. Moreover currently only recursive=1
is supported as argument for the extra options parameter.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With