Parts - Helmut-Ortmann/EnterpriseArchitect_ScriptDotNet GitHub Wiki
Parts
ScriptDotNet ships with the following parts:
EA
- Example Repository
- ScriptDotNet.eap
Projects
ScriptCSharp
C# project to show how to implement scripting with C#.
- Console Application, ScriptCSharp.exe
- Helper Scripts (Install, Test, Set environemnt Variable)
- Library for dll's
- EA VB Scripts as examples
Environment variable
- EA_SCRIPT_HOME
- The directory of the C# Console Applications to handle your requests.
CSharp code
Name | Function |
---|---|
ProgramMain.cs | Program Main Main(string[] args) |
ScriptCHarp.cs | Doing the work |
Scripts
EaScriptDotNet delivers the followings Scripts to help you. If you want to use them, you may have to adapt them to your environment.
Name | Function | Adapt |
---|---|---|
CheckEnv.bat | Check environment if proper installed | no |
Install.bat | Installation of ScriptCSharp | no |
SetEnvDebug.bat | Set the EA_SCRIPT_HOME environment variable to the DEBUG script folder | Folder path debug (\debug\bin) |
SetEnvProductive.bat | Set the EA_SCRIPT_HOME environment variable to the productive script folder | Folder path productive (\release\bin\ or your installationfolder) |
EA VB Scripts
Remember: Take the EA-Template and add three or so lines of code and you have done integration or the so-called glue-code.
To give you a start:
Name | Group | Function |
---|---|---|
AutomationScripts.xml | xml file to import the Scripts into EA | |
ListDiagramElements | Diagram | Example to run a Script from the Diagram Context |
ModelSearch | ModelSearch | Output selected item in "Find in project" |
ProjectSearchLinq | ProjectSearch | Search implemented with LINQ to SQL |
ProjectSearchScript | ProjectSearch | Search implemented with SQL |
RunCommandVb | Normal | Calls ScriptCSharp.exe for C#/Java |
RunCommandVbTest | Normal | Test RunCommandVb and the call of ScriptCSharp.exe |
TextToSpeech | Diagram, Browser, ModelSearch | Read context item out aloud |
TraversePackage | Browser | Example to run a Script from the Browser Context |
RunCommandVb.vbs
Calls the Scripting in your language according to the technology used
- .NET: C#, VB, F#, C++
- Function RunCommand(CommandExe, param1, param2, param3)
- CommandExe: The Console Application (*.exe) to call).
- Java
- Function RunCommandJava(baseFolder, eaClass, param1, param2, param3)
- baseFolder: The folder with .jar, .dll,.class,,
- eaClass: The Class where the functionality is implemented
ScriptCSharpLinq
- How to use LINQ for SQL
- Activeta with a Normal VB Script
ScriptJave
ScriptJava is a folder because VS 2017 has no Java support. For Details see Java.
Glossary
- VS Visual Studio 2017
References
- EA Script Group Properties
- EA Community, Use C#, VB, F#, Java for your VB Scripting
- Metrics
- Python
- SPARX Webinar Hybrid Scripting
- SPARX Tutorial Hybrid Scripting
- Where is the exe?
- Why LINQ beats SQL