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 - McBie

Pages: [1]
1
General Board / Re: Best way to batch apply tagged value to elemen
« on: July 13, 2009, 10:36:52 pm »
Just adding to my previous post:

The user guide 7.5 says:
Scripts executed in Enterprise Architect have access to the currently open model and are a powerful tool for querying the model in situations that would otherwise require you to perform time consuming and repetitive GUI tasks.

As it says "tool for querying", does it mean I cant do any changes via scripting?

2
General Board / Re: Best way to batch apply tagged value to elemen
« on: July 13, 2009, 10:29:05 pm »
I was wondering if the new srcipting feature in 7.5 is a kind of light weight alternative to an add-in.

We haven't don any add-in yet so the the whole "Active X COM" stuff appears to be kind of heavy for just adding a tag.

Do you have experience with scripting within EA?
Would that work for what we want to do (adding a tagged value to existing elements)?

If so , that could be a reason to upgrade to Version 7.5

3
General Board / Re: Best way to batch apply tagged value to elemen
« on: July 10, 2009, 11:56:03 am »
Quote
Maybe you could do this with a template package. I don't know if tagged values are among the things you can set up for elements using templates.
You can set up tagged values at least it worked with the class element.

But this template mechanism works for elements you are going to create.
I need to bulk apply to existing elements.

Part of our elements have stereotypes from our UML-Profile, so for these I can add the tagged value to the stereotype in the profile and sync them to all elements with these stereotypes.

4
General Board / Best way to batch apply tagged value to elements?
« on: July 09, 2009, 12:43:54 am »
Hi there,

I'm looking for the best  way to attach a tagged value to almost all elements of our model.
We don't want to attach it  manually to every element, so I'm looking for a kind of automatic way apply it to (almost) all at once.

As far as I  understood Version7.5 has built in scripting support, which might be helpful for this, but we are still with version 7.1.

So I guess this leaves me with the automation interface or is there any other way?

Any comments, ideas are welcome!

Thanks in advance!


mArco


5
Bugs and Issues / Re: UML Profile: Order Stereotypes seems to be ign
« on: September 22, 2008, 10:52:03 am »
Quote
Latest version of EA doesn't have this button. If you want control over the order in which elements appear in your profile toolbox, create an MDG Technology containing a Toolbox Profile - the user guide has instructions.
Well .. I'm using build 827 which has this button, so you are telling me its not working ?

Allright I tried what you said the "MDG Technology":
 I included two UML Profiles and one Toolbox Profile into it. The UML Profiles coming out okay, but somehow the Toolbox Profile does not.
I made one diagramm containing one <<metaclass>>ToolboxPage and two stereotypes extending the ToolboxPage.
According to my understanding this should give me two Toolbox Pages - one for each stereotype.
But I get only on Toolbox Page with the name of the diagram containing two "stereo type elements".

Any idea what I might be doing wrong?

Thanks!

6
Bugs and Issues / UML Profile: Order Stereotypes seems to be ignored
« on: September 21, 2008, 03:04:25 am »
Hello,

I wanted to put some order in our profile. So I used the "Order Stereotypes ..." button in the "Save UML Profile " dialogue.

After putting everything in the wanted order  I saved the profile. The profile package now has a tagged value "_profile_data" which seems to contain the order:

<ProfileData><Order><OrderItem node="AWKEntity::class" order="0"/>
<OrderItem node="EntityKey::attribute" order="1"/>
<OrderItem node="AWKDataType::class" order="2"/>
...


So far looking good. But when I import the profile there is nothing ordered.

As I could not find any of the order information in the saved profile  I wonder if the tagged values "_profile_data" should be written but is  not.

Anybody used this feature successfully?

Regards mArco
 


7
Hi Geert,

Quote
Why would you want to set the GUID manually?
Because we want to update the elements from time to time with data from  another system which provides an ID.
By using this ID I could access the element by Id instead of searching or iterating.

I tried your idea passing the id as "name" - it didn't work. I even tried one of their own IDs, but no luck.

I guess I'll store our Id as "Alias" and stick with searching and iterating  :-/

Thanks!

8
Hello ,
 I have a question regarding the GUID of new elements.

From the sdk documentation:
Quote
ElementGUID  - Read only. A globally unique ID for this element; that is, unique
across all model files. If you have to set this value manually, you
should only do so when the element is first created, and make
sure you format the GUID exactly as Enterprise Architect
expects.
Where can I set this value manually?

The creation method Elements.AddNew(string Name,string Type)does not take a GUID as parameter.

Thanks a lot!

Regards mArco

9
Hello,
 I 'd like to change the fill color of the element "Screen"  depending on a tagged value. Therefore I wrote the following shape script:
Code: [Select]
shape main{

if (HasTag("EPDMPhase","1_A"))
      {
            setFillColor(169,248,167);
            drawnativeShape();
      
      }else{
            drawnativeShape();
      }
}
This works in principle.
Unfortunately the fill colour I set in the script is only visible in the two "buttons" drawn in the right upper corner of the screen element.
The main area is unchanged.
There seems to be a difference between the "Background color" one can set in the  "Default appearance" dialogue and the fill color used in the script, at least for Screens. For Class it works as I would expect.

Anybody knows how to achieve the colour change for screens ?

Thank you very much!

10
Hi everybody,
I'd like to some modify the visual appearance of elements with a certain tagged value. So I created a stereotype and assigned  a shape script.
 The script looks like this:
Code: [Select]
shape main
{
      if (HasTag("EPDMPhase","1_A"))
      {
            setFillColor(128,255,128);
            drawnativeShape();
      
      }else{
            drawnativeShape();
      }
}

The funny thing is in the diagramm only the left half of an element is filled with my color.

Any Ideas?

Thanks!

mArco

11
Hello everybody,

I wonder if anybody tried to generate Hibernatemappings from the model with the built in transformation and generation mechanism.

Any hints are welcome! Is it doable?

Currently I'm trying to create annotations for Java but a separate xml-mapping file also would be fine.

What Im a bit struggling with are the annotations for relations.

I would imagine something like  first a transfomation where one could analyze the connectors  and create the approppriate annotation. But where should it be stored, so that in a following code generation it can be accessed and put in the appropriate place in the code file.

I saw that in the java-transformation the Attribut-name of a linkedAttribute is stored as taggedValue at the getter and settter.
But I think the linkedAttribute doesn't provide enough Information e.g. you only have the multiplicity from the other end.

Thanks!

Pages: [1]