问题
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:
- C# as programming language
- recursively process subdirectories is checked
- Create logical diagram for each package is unchecked
- Import defined components is unchecked and greyed-out
- Do not import private members is unchecked
- Create package per namespace is selected
- Synchronize existing classes is selected
- Remove classes not found in code is set to 'always delete'
What is the equivalent translated to string arguments for the ImportDirectory(…)
method?
回答1:
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.
来源:https://stackoverflow.com/questions/36716607/in-which-format-do-i-have-to-pass-arguments-to-project-importdirectory