Book a Demo

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

Pages: [1]
1
General Board / Creating a stereotype with tagged values
« on: March 07, 2025, 07:41:35 pm »
Dear all,

I know how to create stereotypes and tagged values using Configure/UML types. I know how to type tagged values using their description and even have created moderately complex ShapeScripts. Now I wanted to have a stereotype that like FlowPort comes with its own tagged values.

How far I got:
  • Created a package with the EAUML::profile stereotype set
  • Added a package diagram to that package
  • Added a metaclass element to that diagram that extends Core Elements/Object
  • Added a stereotype element to the diagram
  • Added a "extends" connector starting from the stereotype to the metaclass
  • Created an object diagram in a totally different package and placed an object inside that diagram
  • Went to the properties window and tried to select my newly created stereotype by pressing on the "..." button in the Stereotype field. But I didn't find my stereotype there.
What did I do wrong?
My hope was by adding the "EAUML::profile" stereotype to my package everything inside that package would get known to the stereotype and tagged value selector.

The documentation says as the next step I can add tagged values to the Stereotype, and I even succeeded to add predefined ones to it. I also can add Tagged Value elements to my package diagram, but the documentation is a bit unclear on how to fill them with enumeration values, or type them bool, Real or Integer. And - most importantly: How do I then get those stereotypes and Tagged Values selectable in an object's properties page?

Thanks a lot in advance!

    Gunter.

2
General Board / Re: Finding the connector a connector is connected to
« on: March 11, 2024, 09:33:48 pm »
Ha! Now it works. Thanks a lot!

3
General Board / Re: Finding the connector a connector is connected to
« on: March 11, 2024, 09:07:02 pm »
Wow... ...how do I make such a SQL request? And do we need to inform Sparx that the classifier GUID should be exposed to the API? If yes: How does one do that?

5
General Board / Re: Finding the connector a connector is connected to
« on: March 11, 2024, 04:52:22 pm »
Waiting a weekend didn't help: myconnectorTarget.ClassifierID still reads zero for all ProxyConnector elements => Created a minimal .eapx file that allows to reproduce the problem?

Is there any means to attach it to a forum message?

6
General Board / Finding the connector a connector is connected to
« on: March 09, 2024, 02:32:50 am »
As far as I have understood in EA connectors aren't objects => they have no list who connects to them. Instead a connector is never directly connected to a connector, but to a ProxyConnectorElement.

By vbScript actually finds ProxyConnector elements. But if I try to find out where they end by looking at their ClassifierID I get a "0".
What am I doing wrong?


   ' iterate over all objects
   dim objects
   set objects = Repository.GetElementSet("select object_id from t_object where object_type = 'Object'", 2)
   dim currentobject as EA.Element
   for j = 0 to objects.Count() - 1
      set currentobject = objects.GetAt(j)
      
      ' Now iterate over all connectors this object has
      dim objectConnector as EA.Connector
      for each objectConnector in currentobject.Connectors
         dim myconnectorTarget as EA.Element
         set myconnectorTarget = Repository.GetElementByID(objectConnector.ClientID)
         
         ' Our connector technically isn't directly connected to a connector, but to an connector proxy
         ' object named 'ProxyConnector' that then knows the ID of the connector => seach for
         ' proxy connectors
         Session.Output myconnectorTarget.Type
         Session.Output myconnectorTarget.ClassifierID
         if myconnectorTarget.Type = "ProxyConnector" then
            ' Let's try to find out what connector that ProxyConnector is connected to
            dim myconnectorTargetID
            myconnectorTargetID = myconnectorTarget.ClassifierID
            dim targetConnector as EA.Connector
            set targetConnector = Repository.GetElementByGuid(myconnectorTargetID)                  
         end if
      next
   next


7
Tested it for a few days now and legends work fine. Thanks a lot!

8
I have used knowledge from this forum for many shape scripts, already. But now I have a question that exceeds what I found out widely: I want to create a stereotype that
  • ideally comes with its own tag (like the FlowPort stereotype does come with a direction tag)
  • that changes the line color of the ports it affects and
  • that can be combined with other stereotypes like flowport (that does change the port decoration) or a stereotype that only changes the background color

What I know is:
  • how to create my own stereotypes via configure/UML types(but not how to bundle them with a tag).
  • That I can draw a stereotype into a diagram and add tags to it. But then I don't know how to apply that stereotype to a port.
  • If I don't use a shape script I know the buttons that change the colors in a way that plays well with other stereotypes. Also I know how to make the shape script react to tagged values.

But all that combined doesn't add up to what I think I need...

Pages: [1]