Use the power of
- .NET like C#, F#, VB, C++
- Java
for your EA Scripting and Querying.
Implement your EA Scripts in .NET or Java and make only the glue-code to EA in JScript, VB Script or JavaScript. The minimal EA glue-code is responsible for EA integration and passing the parameters to your target environment (.NET or Java).
- Find your typos at compile time
- A vast amount of libraries, examples and tutorials
- Easy testing and debugging
- LINQ for SQL, the powerful way of SQL
One line of code and you are in your Java, C#, VB, F#, C++ environment!
EA: VB Script glue-code
' Run the C#, VB, F#, C++ Console Programm,
result = RunCommand(myScript.exe, "DoTask1", guid, "", "") ' C# vb script glue-code' Run the Java Class, let Java do everything
result = RunCommandJava("%EA_SCRIPT_HOME%", "SparxSystems.RepositoryInterface", " ", " "," ", " ") ' Java vb script glue-code.NET: See ScriptCSharp.cs
switch (command) { // Decide what to do
case: "DoTask1":
var el = _repository.GetElementByGuid (guid); // get the passed element
_repository.ShowInProjectView(el); // show the passed element in project browser
break;
case: "DoTask2":
break;
}Java: See RepositoryInterface.java
public void PrintPackage( org.sparx.Package pkg)
{
Trace( pkg.GetName());
Collection<org.sparx.Package> packages = pkg.GetPackages();
for(short i = 0; i < packages.GetCount(); i++)
{
PrintPackage(packages.GetAt(i));
}
}Take the EA-Script Template and add three or so lines of code and you have done integration or the so-called glue-code. Decide whether you pass the environment like guid ot type to C# or let C# do it.
You may condense this code section to (one line of EA VB Script code):
' Call C# "TraversePackage" and make everything there
runCommand "%EA_SCRIPT_HOME%ScriptCSharp.exe", "TraversePackage", "", ""- Installation C#
- Tutorial C#
- Java
- Use it for other languages, VB, F#, C++, or?
- EA Script Group Properties
- EA Community, Use C#, VB, F#, Java for your VB Scripting
- SPARX Webinar Hybrid Scripting
- SPARX Tutorial Hybrid Scripting
- Where is the exe?
- Why LINQ beats SQL
- WiKi
- Minor improvement Debug and productive script
- VB Script: RunComand with three parameters instead of 2
- LINQ to SQL as project ScriptsCSharpLinq (powerful, database independent)
- Java
- C# Interface
- VB: Browser Script
- VB: Diagram Script
- Preparation Java Interface
