Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: g.makulik on April 08, 2009, 09:41:44 am
-
Hi,
I tried to implement a custom function for the CGT (Code Generation Template) macro EXEC_ADD_IN(). I have placed an extra method in my C# AddIns Main class, where I have implemented diverse EA event handlers, that already work well. The method signature is as follows:
[size=10]public object GetImportFilepath(EA.Repository eaRepository, object args)
[/size]
In the CGT I try to call the method as follows:
[size=10]$relativeFilePath=%EXEC_ADD_IN("EAProtobufAddIn","GetImportFilepath",importClassGuid,"/")%
[/size]
But when debugging, the AddIn method doesn't seem to be called at all and the result of EXEC_ADD_IN is an empty string at this point. I have also tried
[size=10]$relativeFilePath=%EXEC_ADD_IN("EAProtobufAddIn","Main.GetImportFilepath",importClassGuid,"/")%
[/size]
but this yields the same behavior.
Has anyone experience with this? Any help or idea is appreciated.
WBR
Günther
-
I've posted C# examples several times to this forum.
See http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1207649029/1#1 for one of them.
-
Thanks a lot simon.
I had tried a forum search with EXEC_ADD_IN, but got no results at all :(.
WBR
Günther
-
...
I had tried a forum search with EXEC_ADD_IN, but got no results at all :(.
...
Strange, since it has been discussed many times.
Make sure the spelling was exact, and try various punctuation options. YABB (the bulletin board software) can be very touchy about search keywords.
-
Hi David,
I'm pretty sure that I didn't mispelled 'EXEC_ADD_IN'. Try it (may be copying the term from here), you'll find only this thread as result.
Dunno, may be older threads go out of the search engines scope.
WBR
Günther
-
I just tried it and got hits on 62 different threads.
I suggest you set the search for all posts - the default is posts within the past week. Don't change any of the other settings.
-
Thanks. My fault was that I didn't use that nifty search form, but just the
"Search the Forum" quick search.
-- It's all there, you just gotta find it ...