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

Pages: 1 [2] 3 4 ... 163
16
Sure but is it that hard to make a stub in a package that opens up what is currently called a "relationship matrix profile"?

You mean like a Matrix Specification Artifact?

17
I can create stereotypes with shape scripts which set different colours -- but how do I specify that when using my «outpar» ActivityParameter stereotype toolbox item, an 'out' ActivityParameter should be created as opposed to an 'in' one which is the default?

In your profile, give your "ActivityParameter" metaclass element an attribute named "direction" with initial value "out". This appears to work, but it's possible it only works for properties named "direction".

18
But there's no way to check for the element's 'direction' in a shape script -- it doesn't have its own property for retrieval, and it's not a tagged value.

This works...
Code: [Select]
shape main
{
if(hasproperty("direction","in"))
{
setfillcolor(255,0,255);
}
drawnativeshape();
}

19
There's no need to guess. The property names are all documented in the manual; you just have to read it.

Geert

Correct. I've just checked it's neither "ID" nor "DiagramID".

20
It's a long time since I wrote an add-in, but I don't think you're going to be passed a DiagramID in the EventProperties of EA_OnPostNewElement. Try getting the size of the EventProperties then loop through with Get(index) and see what's there - more reliable than guessing the property names.

21
EA will send out broadcasts when certain actions take place, so you need to create functions that respond to those broadcasts. For example, to respond to a new element being created, you will need to have a function called EA_OnPostNewElement. Search the help for "EA_OnPostNewElement" and it should point you in the right direction.

22
Automation Interface, Add-Ins and Tools / Re: Link restrictions
« on: September 25, 2017, 09:04:55 am »
The quicklinker can suggest valid connections but can't prevent invalid connections. You can write an add-in that implements the EA_OnPreNewConnector broadcast handler to prevent invalid connections, or you can write a validation script or add-in to report on invalid connections in your models.

23
To avoid having to hide the component icon, have you considered extending UML::Class instead of UML::Component? A UML Component is basically a Class with required and provided interfaces, and EA allows you to add required and provided interfaces to Classes anyway, so you wouldn't lose any functionality.

24
The Extended Requirements page contains a bunch of stereotyped Requirements, but they are not "UML::xxx".

EAREQ::FunctionalRequirement(UML::Requirement)

The rest follow the same pattern. If you get stuck, create one in an empty model and then look in t_xref for a definition like this

@STEREO;Name=FunctionalRequirement;FQName=EAREQ::FunctionalRequirement;@ENDSTEREO;

25
It would have been nice to get feedback from Sparx in this forum.

If you aren't getting the answers you need from this user forum, you can contact Sparx Support. Use the "Report a Bug" link at the bottom of this page.

26
Firstly an aside
I don't want to start a war on whether VBScript has types or not but the following didn't work in my in-EA script
Code: [Select]
Dim myString As String
I got "Expected end of statement". I would have thought String was a simple enough type for VBScript to handle. Removing "As String" worked. I also note that "Dim myString As EA.Attribute" worked. Did I define a string wrongly? Either way, it was the "catch type-related errors" that I was after so I couldn't use VBScript.

"Dim myString As EA.Attribute" isn't typing myString, it's just letting EA's intellisense know. "Dim myString As String" fails because EA's intellisense doesn't know about Strings, just the EA Object Model.

28
Bugs and Issues / Re: SysML Item Flow with item property
« on: August 15, 2017, 09:13:54 am »
Ah, OK. ItemFlow has a tagged value named itemProperty. Set that to reference a Property.

29
But still I can not understand - I save it as a profile and generate my own MDG Tech. How it will be applied to the other technologies (Archimate 2)?

For redefined stereotypes, you have to go to the MDG Technologies dialog, select your technology and click the "Set Active" button. Then you can carry on using the Archimate 2 technology and your modifications will apply to it.


My new tag will be applied to new elements, but for the other elements that I have already created it won't ne applied. How can I apply my changes to the already existing elements of my customized technology?

Right-click your stereotype in the Diagram Toolbox and select "Synchronize Stereotype". It will update all tagged values in all existing elements with that stereotype.

30
Or you extend them in your own MDG thereby adding whatever tagged values you need.

Alexey, you don't say which version of EA you are using. Hopefully it is a recent version, because the functionality to do what you want to do was added at EA 13.0

You can add tagged values to an existing stereotype by using the redefines Generalization. See the help file topic "redefine_ster_other_prof" (ribbon|Start|Help|Go to Help Topic, and paste "redefine_ster_other_prof" into the dialog - without the quotes).

You will need an abstract stereotype "Archimate2::ArchiMate_ApplicationComponent" and a stereotype "ArchiMate_ApplicationComponent", with a redefines Generalization between them. The stereotype "ArchiMate_ApplicationComponent" will hold the additional tagged value declarations. Once you have built and deployed your technology, you will need to set the technology "Active" after which every Archimate2::ArchiMate_ApplicationComponent you create should have the additional tagged values you defined. Synchronizing tagged values should add them into all existing elements.

I hope this helps.

Pages: 1 [2] 3 4 ... 163