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.

Topics - Uffe

Pages: 1 ... 24 25 [26] 27

I'm working on an Add-In for a client, which on double-click on an element launches an external web browser with the URL taken from the element's "file" list (obviating the need to open the properties dialog, selecting the Files tab and launching the browser from there).

My question is this: is it possible to launch EA's internal web browser instead?
I can't find a function for this in the (9.3) API.



Automation Interface, Add-Ins and Tools / EA_ShowHelp
« on: October 24, 2012, 07:05:40 pm »
Hi all,

I'm working on a fairly large Add-In, which comes with its own help file. I'm having trouble getting EA_ShowHelp to work.

My handler for EA_ShowHelp simply opens my help file to the first page - but it never gets triggered, nothing happens.

I've also got a "Help" item in my Add-In's menu, and selecting this menu item does the exact same thing - and that works.
Any ideas?



Hi all,

I'm trying to write a script which, given a diagram, creates a new element, moves the diagram into the new element, and moves the elements shown in the diagram into the same new element.

Problem is, the EA.Collection class has no Add() method - just AddNew().
I've tried just setting the ParentID of the diagram to the new element's ID, and deleting it from the package's diagrams collection, but it doesn't seem to work.

It seems to me this is a fairly common need, so does anyone have a script snippet to get it done right?



Automation Interface, Add-Ins and Tools / Save Linked Document to File
« on: December 15, 2011, 08:53:12 am »
Hi all,

OK, maybe I'm just being stupid here, but -

I've never had much use for Linked documents before, preferring to keep any generated documents in an external version-control repository.

But now I'm playing around with the create-document-to-artifact feature (new in 9.2), and I'm loving it. Only thing is, I'd like to do both: keep the most recently generated document in EA, and track it in my version-control repository.

So is there a way of dumping a Linked Document to a file?



Hi there!

I'm working on an MDG Technology for a client, where I need to create a shape script for an element type which is normally created as a composite.

If it isn't considered proprietary material, does anyone have a script snippet to draw the composite "link" symbol?



Automation Interface, Add-Ins and Tools / Set user password?
« on: October 17, 2011, 11:05:13 pm »
Hi all,

I'm wondering if there's a way to set a user's password through the API? I can't find an API call to do it, and the passwords are encrypted when stored in t_secusers.




I've created a custom Add-In search method, which I call from a Model Search. I want to add this to a Search View under My Views and have the results of the search listed under the corresponding node.

Everything works except the listing of the results in the View; it instead says "Search Found No Items."
When I open the search up in the Model Search window, it returns the correct results. I've done the CLASSTYPE/CLASSGUID magic, so I can open up the results when they are presented in the Model Search result window - but the Model View insists that there are no results.

What am I doing wrong?




I'd like to set EA up to generate a nightly HTML snapshot of a model.

Can I?

In other words, is there a batch mode? Shot in the dark, but worth the powder.

If not, is there another simple way to achieve this? Maybe an EA command-line option? If I wrote this in the Automation Interface, how hard would it be? Would I need to recreate the html page layout manually?

Automation Interface, Add-Ins and Tools / JIRA Integration?
« on: May 19, 2009, 11:00:15 pm »
Hi all,

Does anyone have any experience of EA and JIRA?
Any Add-Ins out there?


Hi all,

I'm wondering if anyone's got any best practices to share on how to CM EA extensions. I'm talking primarily about UML profiles, Code and Transformation Templates, and also code written against the Automation Interface.

I'm thinking that Automation Interface code can be handled in the regular CM system, as can the UML profiles since they're modelled. But what about the Templates?

And how are these things best distributed to users? Turned into Add-Ins and sent out as essentially binary installation packs?

Any thoughts appreciated. I'm not actually a toolsmith myself, nor a CM dude, and the company I work for doesn't have a great deal of UML experience. In other words, don't be afraid to give me even the really obvious stuff, hokay?




I'm interested in coding up some model validation rules.

Has anyone got some sort of higher-level rule definition / model validation execution thingy which I could use to define a set of rules in XML or similar rather than hard-coding them in Java?




Well I've finally taken the plunge into the Automation Interface.

I've written (well actually, Dan did in case he's reading this, but I'm the one who'll be doing the maintenance) a Java program to reverse-engineer one of our proprietary configuration languages.

This language has 'structs' which contain 'fields.' The fields in turn have a type, but structs cannot contain other structs, nor can fields contain other fields. In other words, the type system is very simple.

I have created a Profile to represent these entities in UML.

Now here's the problem. I can generate all the 'field' UML classes just fine, and also all the 'struct' UML classes. But the attributes in the 'struct' classes don't get the right types.

The class for a 'struct' is, of course, intended to use the 'field' classes for its attribute types. But while the name matches in the generated model, the actual reference is missing.

I've tested this by renaming a 'field' class which is being used in a 'struct' class. Normally when you do this, EA updates the type name in the using class. In my case this doesn't happen, indicating that the attribute type is not correctly referenced.

If I go into the dialog and set the attribute type to the exact same one by selecting it from the list, the test works.

The 'struct' and 'field' classes are in two packages, but I tried putting them in the same package and that didn't make a difference.

When I create my 'struct' class, I use the org.sparx.Attribute.SetType() method, simply specifying the name of the previously generated 'field' class.

What should I be doing?




I have created my first MDG Technology. It contains a set of Profiles, a couple of Transformation Templates and a single Tagged Value Type (a RefGUID type named "InstanceType").

I have deployed the MDG Technology and am using it in a different project to the one where it is defined.

The problem is that in the project where I'm using it, the "InstanceType" seems to be absent.

The type is not visible in the "Settings-UML" window, and neither are the stereotypes I've defined in my profile. But the Transformation Templates are visible under "Settings-Transformation Templates."

My MDG Technology contains only profiles, transforms and tag types. I've checked the file, and the type is definitely in there along with the rest of the stuff.

I am using the automation interface to reverse-engineer a lot of classes, and this process fails because the "InstanceType" is not available in the target project. If I add it manually, it all works.

I'm thinking I've missed a step in the deployment, but I can't think what.
Anyone else?



Hej allihopa!

When I use the Automation Interface (Java) to create classes, the attributes end up ordered by name, not the order specified. I'm just calling elements.AddNew() a number of times.

The thing is, while the order is not important in UML I am in fact creating classes which, in the next transformation step, will get turned into Enumeration types. In other words, I do want the order preserved.

Is there a way of doing this in the Automation Interface?



Hello everyone,

I'm trying to create a Profile containing a Stereotype extending Enumeration.

It's not working.

First off, the icon in the resulting toolbox is the Package icon, which indicates something is amiss.

Secondly, I can't use my shiny new stereotype at all. If I select the icon in the toolbox and create an element in a diagram that way, the element type becomes Class, not Enumeration.

If I select an Enumeration in the standard Class toolbox, I can select the stereotype in the drop-down list in the creation dialog, but once I click OK the element type becomes Class.

And as we all know, you can't change the element type from Class to Enumeration.

So what gives?



Pages: 1 ... 24 25 [26] 27