Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Bjorn S

Pages: [1]
1
I am not sure how I see how EA-Matic would help? Say I'm running a script (outside EA), that instantiates an OLE object to load the "EA.Repository"; how would EA-Matic then help with having my outside script running a script that is in the EA repository?

Thanks,

Bjorn

2
I am using Sparx EA 13 build 1309.

I can run the HTML Report by doing EA.Repository->GetProjectInterface()->RunHTMLReport(...). Ditto for the pure RTF report, doing ...->RunReport(...). How would I go about getting the the "Diagrams Only Report" so I can generate the diagrams as PNG-files?

I suppose I can loop through the whole model and call a ...->GetProjectInterface()->PutDiagramImageToFile(...) for each diagram I find, but it certainly would be more convenient to just use the existing functionality.

The root problem here is of course that RunHTMLReport() doesn't generate image file names that are persistent across invocations (i.e. based on their GUIDs) like the "Diagrams Only Report" does. Missing a persistent way to address a diagram, it makes it impossible to refer to them from other documentation (e.g. a wiki).

Suggestions, ideas, ...?

Thanks,

Bjorn

3
Suggestions and Requests / Git version control support?
« on: March 19, 2012, 08:42:28 pm »
Hello, will Sparx add support for using Git for version control? Conceptually it shouldn't be much different from how Subversion has been integrated. Are there any such plans or roadmaps for this?

Thanks,

Bjorn.

4
Bugs and Issues / Re: EA+Subversion out of sync?
« on: March 23, 2012, 01:22:35 am »
Is there any other reason to require locking other than to avoid having to deal with conflicts if two or more people change the content of the same version-controlled file (EA package) at the same time?

If not, then there should be an option not to require such lock and thus also provide Git integration, as such conflicts are easier to deal with in Git and as a last resort can be manually resolved using a text editor.

Bjorn.

5
In general, Packages may have more Packages, Elements and Diagrams as children. Elements may have more Elements and Diagrams as children. Thus you need to do a traversal to pick up all the children below an element and construct the structure you wish to get out of it. This is pretty trivial using Javascript and recursion. ;)

Bjorn.

6
Automation Interface, Add-Ins and Tools / Generating WSDL from Javascript
« on: February 10, 2012, 05:15:40 am »
I have Javascript code that creates the WSDL structure (WSDL Namespace, Types, Messages, PortTypes, Bindings, Services) along with the accompanying WSDL element (stereotyped to WSDL) that holds the service definitions to create the WSDL file for. If I right-click the WSDL element in the menu and select "Generate WSDL..." and follow through the set of menus, EA creates the WSDL file just fine.

Now, how do I run the "Generate WSDL..." from within Javascript? This will enable me to fully automatically create the actual WSDL file(s) from a separate model structure.

And, of course, I'd be interested in hearing how I may run *any* of the menus from within Javascript. ;)

Thanks,

Bjorn.

7
I am using EA 9.1, on Windows 7.

I created a scripting group of type "Project Browser" and added a few scripts. Those scripts show up as selections for the Project Browser script context menus, and run fine.

I wanted to export those as a MDG Technology to make it easier to share with others on the team - it's easier to import just one file instead of having to create a correctly named and typed group, create empty scripts and then copy & paste each script etc.

So:
  • I created a MDG Technology file using Tools -> Generate MDG Technology File...
  • Clicked Next
  • Selected "Create a new MTS file" and clicked Next
  • Gave a good path and file name for the MTS file, clicked Next
  • Entered the Script Group as the "Technology", selected a good path and file name for the XMI file, gave an ID, Version and Note, and clicked Next
  • De-selected everything except "Scripts" and clicked Next
  • Selected the scripts I wanted to include from my script group and clicked Next
  • Clicked Finish


When I imported the MDG Technology I had just created (the XML), the scripting group was correctly created and named, and my scripts were all there. But, the group ended up with type "Normal" instead of "Project Browser", and thus my scripts were unavailable in the Project Browser. EA won't let me change the scripting group type for groups that were imported.

I have tried modifying the XML in both the XML and the MTS file so that the "type" attribute for each script element says "project browser" (also attempted with variations on capitalization, restarting EA between each attempt) instead of "normal". However, after reimporting (and importing into a fresh EA), the group still has type "normal" in EA and thus my scripts don't show up in the Project Browser.

Will modifying the "type" attribute help, and if so, what should I put in there to make the scripting group a Project Browser group?

Is this a bug in EA in that it doesn't get the correct group type right away? How may I get around it, if so?

Am I going about this wrongly? What is the recommended way to share a set of scripts, if not through a MDG Technology file, to avoid a bunch of copying and pasting? (The scripts are maintained separately in Subversion, as are the model packages .)  How may I make EA export the scripting group as  an MDG Technology file while keeping the group type intact upon import?

Any pointers and hints are appreciated.

Thanks,

Bjorn.

8
Is it possible to access the EA functions that the EA menus refer to, from within JScript? Specifically I am looking for being able to call the Element -> Find in diagrams... function from within JScript. Any pointers to this and/or reference documentation for how to call other/any of the EA functions from within JScript is much appreciated.

Thank you,

Bjorn.

9
It would be interesting to hear whether this is a known limitation to the Linux version or if it's a bug that is being worked on. Or am I the only one seeing this problem?

Thanks,

Bjorn.

10
This was running under Linux. I just ran the same thing in EA under Windows XP, same EA version, and it works fine. Is there something wrong with the Linux version in terms of the object model and/or scripting implementation?

Thanks,

Bjorn.

11
I am using EA version 9, build 906.

Is there a documentation on the Javascript / JScript scripting available, and if so, where? I find that the object model described in the JDK doesn't always correspond to what EA works with or what the IDE in EA describes for the object. Say I select a package in the project that has several sub-packages, and run the following simple script:

---- 8< ----
!INC Local Scripts.EAConstants-JScript

var e = Repository.GetTreeSelectedObject();
Session.Output("elem type: " + e.ObjectType);

var pkg as EA.Package;
pkg = e;
Session.Output("pkg type: " + pkg.ObjectType);
var pkgs as EA.Collection;
pkgs = pkg.Packages;
Session.Output("pkgs type: " + pkgs.ObjectType);
var count = pkgs.Count;
Session.Output("count: " + count);
---- 8< ----

... I get the following output:

---- 8< ----
elem type: 5      
pkg type: 5      
pkgs type: 3      
---- 8< ----

I.e. execution stops at trying to get the Count from a Packages object - the type value of 5 is otPackage, 3 is otCollection - with no error message or other indication that something is wrong. How may I go about getting information about an element and it's child elements? I.e. where is a better and more complete documentation that the Enterprise Architect User Guide and the auto-complete suggestions from the EA Script IDE?

Thanks,

Bjorn.



Pages: [1]