Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: rayt on June 05, 2012, 08:46:24 pm
-
Hello
I'm trying to write a model search script (from doc: Scripts that can be executed as model searches; these scripts are listed in the Search field of the Model Search window, in the last category in the list)
How do I access the entered search term from inside the script? I found no hints in the template demo script or in the docs.
Thanks in advance for your tips.
Ray
-
Isn't that the same as with Add-in Searches?
There the search term is passed as a parameter to the search operation.
Geert
-
EA creates a template for a search script like this:
..
function OnSearchScript() {
..
}
..
OnSearchScript();
So it looks like no function is called, but the file is executed when the search is run.
I've got no clue how the search term could be passed into the file.
Cheers,
Ray
-
You better ask support then, I wouldn't know either.
Geert
-
Thanks Geert, will do so
I'll post here when I find out more.
Ray
-
A little update: This is a known limitation, it'll get added in a later release.
-
Hi Ray,
Just in case this is an acceptable alternative: you can always ask the user for the search term. See below for eg vbscript.
Paulus
dim answer
answer = InputBox("Prompt","Title","Default")
Session.Prompt answer,promptOK
-
Thanks Paulus. Until search term access is available, I'll use this as a fix.
Ray