Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: ArshiaZare on June 06, 2023, 07:06:16 pm
-
Hello all,
I have a python code that needs to run on EA, (the code works outside EA and all is fine) I thought maybe using Javascript in scripting tool that EA provides is the answer, as it's been awhile since I have used JavaScript (without HTML for that matter) any code templates I can use?
thank you
-
Python will run entirely outside EA. Use Win32 to either create an EA instance or to connect to a running one (I usually use the latter).
q.
-
Python will run entirely outside EA. Use Win32 to either create an EA instance or to connect to a running one (I usually use the latter).
q.
thank you for your reply, yes my python code uses win32 and runs the needed functions all fine, I wanted to know if there is a way to have this added as a script in EA so the members of my team can also add it in there so there is no need to run it outside for convinience, my idea was to use javascript to access the python code, if there is nothing notable i can do (nothing thats not too much of a hassle) then i geuss I'll continue running it outside, no problem :)
-
should be possible using shell.run or something like that.
Here a reference to a solution using VBScript, but usually you can achieve the same thing using javascript
https://stackoverflow.com/questions/6732543/running-python-script-using-wshshell-run-in-vbs-does-not-generate-output-file (https://stackoverflow.com/questions/6732543/running-python-script-using-wshshell-run-in-vbs-does-not-generate-output-file)
Geert
-
I had an add-in to run Python. Was fairly easy to code (basically stating from Geert's 10 minute tutorial).
q.