Python - Helmut-Ortmann/EnterpriseArchitect_ScriptDotNet GitHub Wiki
Python
Under construction!!!!!
If you know how to develop and run Python, it's simple. Add one line in the EA VB Script to call your *.py file:
Dim result
' Run Python with the file 'MyPythonFile.py'
' The Windows environemt variable 'Path' should contain your Python bin folder
' The Python Scripts uses the first EA Instance with its repository
' You have full access to the EA Repository and the EA GUI
result = runPython("%EA_SCRIPT_HOME%MyPythonFile.py", "MakeSomeThing", "", "", "")
' Show the result in a message box.
' Consider using the EA GUI for your results.
MsgBox "Output='" & vbCRLF & result, 0, "Output of RunPythonDemoTextOutput"
Prerequisites
- Python installed
- Environment varibale 'PATH' contains path to Python.exe
Installation
- Clone 'EnterpriseArchitect_ScriptDotNet'
- Environment Variables
- EA_SCRIPT_HOME Folder with all the .py,.exe,*.dll files
- Make sure PATH contains the correct path to your Python environment
- Install in EA the VB Scripts (if you don't use the delivered EA model):
- RunCommandVb.vbs
EA Script-Types
In the EA Script-Groups you create VB Scripts which later appear in Context Menues.
Group | Description | ContextMenu of |
---|---|---|
Browser | Works from Browser | Browser |
Diagram | Works from Diagram | Diagram |
ModelSearch | Result row in Search Window | Selected rows in Search Window |
ModelSearch | Result row in Search Window | no |
Search | Should be a Search, entry 'Script' in Category Search Window | no |
Import/Export EA Scripts
- Configure
- Transfer
- Export Referenced Data
- Import Referenced Data
- Transfer
Glossary
- API Application programming Interface
- COM
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