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 - 2pointO

Pages: [1]
1
Hello,

I don't want to add notes because want to be able to hide or show specific labels seperatly or display specific component informations throw those labels therefore, I want multiple labels for one element like this one :

Code: [Select]
shape label
{

 setOrigin("SW",0,0);

 println("Object: #NAME#");

}

2
Hello,

Is there a possibility to add more than one label to an element which is not a connector (e.g. component , exposed interfaces ...?

Greetings Sarah

3
Hello,

I have a few components to which I want to add several exposed Interfaces of different types. I add them to the component so I can move them around on the edge of the object and connect them with other objects.
Is it possible to group those exposed interfaces into categories. I know I can create an interface object but then I can't attach it to the component any longer and lose information displayed through the component (the interface object has no information.). For example:

Component : Dog
Interface category : move
exposed interface : slow , fast , not ....

displayed in a hierachical structure so I can add to the component dog the exposed interface : move.slow or move.fast or just move.

Basically I want to group them together in a folder but INSIDE of the component so that I still can move it around and attach it to the componet it's supposed to be for. Any hits, tips?

Thank you.

4


Both setups have the exact same options. Only difference is the component color , but even if I change my component color as well it works fine. There is a clear visible shadow but just the color remains the same.

The Shapescript doesn't effect my shadow colors in any way , but even without the script the shadows doesn't work with EA 12.1

5
I use EA Version 11 and the colors are working fine with a good distinction between background and elements but my collegue uses EA Version 12.1 and there only the default grey shadow is shown.

I already have a shape script on the elements, the shadow was an additional option to vistualize information the easy way, I thought :(.

Maybe it's a bug in the newest EA Version?

lg Sarah

6
Hello

I've set up my Enterprise Architect to show Element Shadows (in the Tools-Option-General-Diagram-Appearance menu).
After that I've created some custom shadows at Settings- Project Types - General Types and applied it to all elements.

As a result I have a normal grey default shadow shown, but it won't switch colors when changing the status to the right color.

Any hits on how to go about that?

Greetings Sarah

7
Works, thank you :)

Sarah

8
Hi,

I also want to set the appearance of an element via a VBA Script which automatically creates component out of an excel sheet I used :
Code: [Select]
myElement.SetAppearance(1,0,255)
myElement.Update
parentPackage.elements.Refresh
 
and when I try to run the script I get the error : Error while compiling , syntax error , expected =    (translated)
VBA doens't need the ; at the end , I have mutliple methodes in that script that work fine with the syntax but here it asked me to set a "=" for what?

Thank you

9
Thank you , decorations is just the thing I needed :)

I'm gonna try to transfer my shapes with the new input. Thanks for everyones help.

Sarah

10
Code: [Select]
shape main
{

dockable="standard";
DrawNativeShape();

addsubshape("element",10,10,11,-10);
addsubshape("element",10,10,11,-10);
addsubshape("element",10,10,11,-10);
addsubshape("element",10,10,11,-10);
addsubshape("Circle",30,30,80,75);

shape Circle {
dockable="standard";
scalable="false";
setfillcolor(218,165,32);
ellipse(0,0,35,35);

}

shape element
{
scalable="false";
setfillcolor(255,255,255);
rectangle(00,0,-24,-18);
}


I have a script similar to this (but with a lot of if clauses but thats not important)

So now I have a nativ looking component with 4 appended elements attached to the component shape at the left upper side,
and a circle at the left bottom corner, perfect.

Now I rescale the component to a bigger then default size in the diagram but the circle and the elements now move and don't stay fixed at the components shape that I want to. I know it works if I set the the scalable="true" but I have to find a solution where it's possible that those elemens stay always at the same position relativly to the component shape.

If I have a lot of information in the component and rescale it really big the appended shapes get REALLY big and block a lot of the screen which I don't want so scalable="false" is a must in that case but without the elements moving up and down as I resize the componet.

Edit:  Or how can I align or join the nativ shape with the other shapes, both have the attributes dockable="standard" but how do I "dock" it onto each other?

11
Hello,

I know figured it out with only taggedValues and it is working fine.

My next concern would be how do I add a shape to another shape with the following behaviour:

If I reszise the component the added shape should stay at the same spot onto the component but without resizing the shape.
I have scalable ="false" already on but when I resize the component for example because a lot of information is given in the compartment of the component , how do I get it that the shape stays as small as it's supposed to but moves with the component.

I have the DrawNativShape() and another Circle at the right lower corner overlapping (or just docking not overlapping would be fine too). Can I dock them ?

Thanks for your help so far :)

12
Hello,

I have following problem.
First the idea what I want to achieve :
I have a component diagram with the standard displaying of the component shapes. For visualizing spezific tagged values I added a shapescript to a stereotype which is working fine.
Now I'm trying to write a script to automatically change the appearance of all elements of a packages through assigning the customized stereotype to them which also works see this JScript :

Code: [Select]
function main()
{

var thePackage as EA.Package;
thePackage = Repository.GetTreeSelectedPackage();

var elements as EA.Collection;
elements=thePackage.Elements;


for (var i=0;i<elements.Count;i++){
var currentElement as EA.Element;
currentElement = elements.GetAt(i);
currentElement.Stereotype="custom";
currentElement.Update();
thePackage.Elements.Refresh();
}

Session.Output("Stereotype changed into CUSTOM");


}

main();

So now everything is displaying the way I want it to and I can get my wished diagram view for presenting purposes.

Here's where the problem is:

Now I want to change the appearance back to the default component type.
Because I have over a few hundred components in my package it would take a long time to reset them manually.

I had 2 thoughts on that , either delete the existing stereotype assigned to the element (but without deleting the stereotype definition because I later want to use it again with the shape script) or assign it a new stereotype which only shows the default appearance.

I tried it this way :
Code: [Select]
function main()
{

var thePackage as EA.Package;
thePackage = Repository.GetTreeSelectedPackage();


var elements as EA.Collection;
elements=thePackage.Elements;


for (var i=0;i<elements.Count;i++){

var currentElement as EA.Element;
currentElement = elements.GetAt(i);


var currentStereotype as EA.Stereotype;
currentStereotype=currentElement.Stereotype;


if(currentStereotype.Name="custom"){
currentStereotype.Name = null;

}


currentElement.Update();


thePackage.Elements.Refresh();
}

Session.Output(currentStereotype);


}

main();

But now it tells me that edit and continue are unsupported for the stereotype. If I give it another name , it just adds a blank stereotype of the name to the already existing custom stereotype to the element which doesn't override the appearance of the custom shape script. (looks like << blank , custom >>)
I even tried to assign it the _strickness attribute for only having one stereotype at a time but somehow this doesn't do anything.

The Idea behind this was to build a switch to have elements in 2 versions for displaying different attributes visually and to go back and forth between those two whenever needed.

Maybe someone can help me or knows another way around this?

Greetings Sarah

Pages: [1]