Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In which format do I have to pass arguments to Project.ImportDirectory(…)?

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?

like image 257
David Avatar asked Apr 19 '16 11:04

David


People also ask

How do you pass arguments to a Python file?

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.

How do you set the import path in Python?

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.

What does \\ mean in Windows path?

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


1 Answers

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.

like image 141
David Avatar answered Oct 09 '22 07:10

David