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

Pages: [1] 2 3 ... 542
1
depending on the "order" of the stereotypes (although in UML there is no order)
I can't find any information in the UML spec about whether they are ordered or not. But there is some kind of ordering in the spec because if multiple stereotypes aren't applied they are displayed in an order.

- You can't use the field t_object.Stereotype anymore as it now contains one of the multiple stereotype names (and it might be any of them)
And you shouldn't be using it. The API allows access to the full list even if there are properties (on each object) to access that field.

- Metatype determination becomes uncertain
Always the first.

- Shapescript might behave erratic, depending on the "order" of the stereotypes (although in UML there is no order)
Metatype if it's defined and if not then the first.

- metamodel constraints will probably behave in weird ways
Not as far as I'm aware.

- the icon in the project browser/toolbox will be what?
For the project browser it's the metatype. For the toolbox it's a non-issue because a toolbox item can only have one stereotype.

2
General Board / Re: UC Scenarios flushed at import
« on: August 17, 2026, 03:44:20 pm »
Just to clarify, are you exporting the model with the detailed scenarios before doing the import?

The scenarios should be present in the native xml, xmi 1.1 or xmi 2.1 (the only formats that are expected to round trip everything) and if they aren't they would be removed when synchronizing with any element found in the imported file.

3
General Board / Re: Updating a shared repository from an offline copy
« on: July 13, 2026, 09:49:48 am »
Personally I wouldn't trust my users to follow that process correctly.

That's what the version control integration is designed to do.

Version control the entire branch - https://sparxsystems.com/enterprise_architect_user_guide/17.1/modeling_fundamentals/applyingvctobranches.html
Create the copies of the model that you need.

From that point the package is locked until someone checks it out either on the shared model or their private model. The process for a change on the local model is then:

- Get All Latest on the private model
- Check out the package
- Do the work
- Check in the package changes
- Run a GetLatest on the shared model

Users in the shared model follow the same process without the first and last steps.

4
Repository.GetContextItem() and Repository.GetContextObject() both give you the object that has its properties displayed. That could be the object you've asked for but it could also be the browser selection.

If you want to be more precise use

Repository.CurrentSelection

It was designed to address the limitation that we offer Diagram.SelectedObjects and the Repository functions mentioned above but no way to get multiple selection in other places. That's important because it gives you enough information to know if the focused element in on a diagram.

If I had your need with EA "as is", I would use something like this:

Code: [Select]
function FocusedElement {
    if( Repository.CurrentSelection.Location == "Diagram")
        return Repository.GetContextObject();
    else
        return null;
}

5
Here's how to specify an icon for the toolbox:

Assign Icons To Toolbox Items

To use an image for diagram rendering, add the image to your technology:

Add Images

Add a shape script to your stereotype.

Draw the image using the image function:

Drawing Methods

Example Scripts (Near the end)


6
General Board / Re: Javascript Model AddIn - Including Libraries
« on: June 10, 2026, 09:23:18 am »
For clarity, I'm not familiar with that EA Global Summit presentation or any framework that the presentation references. I can only comment on the Model Add-In functionality itself.

Yes, you can add a Dependency from your «JavascriptAddin» to another class that contains additional code to be able to reference that class. The reference to a utilities package makes me worry that you've added a dependency to a package instead, but I can't see your model. I suspect the utilities package is the way the presenter like to organize his model.

7
Automation Interface, Add-Ins and Tools / Re: qea/qeax file format
« on: May 27, 2026, 08:32:07 am »
I discovered lately that since the introduction of qea files, someone at EA got to the luminous idea to write the qea filename into the repository.ConnectionString variable.
From what I can see it has always returned the path to the file.

Since my addin does a check on the connection string, I'm dragged into a new problem. I have to check the repository.ConnectionString if it is a real connectionstring or if it is a qea-filename. And if it is a (qea) filename, I have to parse the content of the qea file to get the connectionstring. But if I want to properly parse the qea file, then I need to know what the exact format is. I do not want my users will be confronted with another exception again, because I misinterpret the file. I haven't been able to find the definition of this qea file yet.

Of course I know the qea file is human readable and the first line looks like a connectionstring. But does a qea file ALWAYS look like this?
Oh, you're using a shortcut file. In that case the API behavior you're describing has been that way since version 7.

Can someone tell me where I can find the definition of the qea file format? Or is there already a qea-file parser in the EA library?
Read the first few bytes of the file. If it's a model it will start with the ASCII "SQLite format 3". If it's not that it will be the referenced human readable connection string.

8
I'll be honest. Everything I said was based off my memory and I didn't try to create an aggregations. I'm not going to comment on how they are created.

There are also special cases for Aggregation connectors because they date back to before UML 2.0. If you want to be strictly UML conformant just use Associations instead.

You should definitely ignore the SourceIsNavigable and DestIsNavigable columns on t_connector. They are boolean values and we want to store non-boolean values for navigability. The result is that they aren't used.

9
In UML 2.5.1 the navigability of an end is determined by whether it is contained in the navigableOwnedEnd. But there are 3 different notations that are relevant. "Navigable", "Non-Navigable", and "Unspecified".

For legacy reasons EA has two different ways to set this information and when you change one, the other will be updated.

The direction "Source -> Destination" corresponds to the Destination being navigable and the Source not being navigable (but it could still be notated with unspecified). "Destination -> Source" is the opposite. This works in the GUI because you can only change one at a time.

In the API it isn't quite as clear-cut, but the first update call is performing the same validation as the GUI

Code: [Select]
  oConnector.Direction = "Source -> Destination"
' ...
  oSourceEnd.Navigable = "Navigable"
  oTargetEnd.Navigable = "Unspecified"
  oSourceEnd.Update
  oTargetEnd.Update
  oConnector.Update
The oSourceEnd.Update updates the connector direction because it's incompatible with the value for Navigable that is being saved.

The answer is to only include one method for setting the navigability in your spreadsheet.


11
I believe Geert has cut to the core of the issue.

The Browser is not relevant for this function at all.

It gets more complicated than that though:
  • It is possible to drag a tab from the main window out and dock it elsewhere. In that case it becomes the last of the visible main window views that you interacted with.
  • There may not be an active diagram at all. In particular if you're running from a script editor or console, that will be the active window so the current diagram will be null.


12
- I have learned/understand that the x axis needs to be negative.
y axis, not x.

- I have learned/understand that if anything goes "wonky" that the object is restored to some default location at the top left.
If any code puts an element into a position it can't possibly be displayed, it gets fixed.

You've already identified everything you need to do what you want except for Sequence. The good news and bad news is that you don't get anything for free. If you change the position of one DiagramObject it won't change the position of any others.

The documentation is at https://sparxsystems.com/enterprise_architect_user_guide/17.1/add-ins___scripting/diagramobjects.html

That's everything EA offers you for the layout of objects.

What you're about to discover is that laying out a graph in general is a hard problem and you can't solve all the problems using a single algorithm because the different goals of a layout are mutually exclusive. Adding nesting/denesting of nodes adds to the list of problems that you'll encounter.

13
Unfortunately, I am getting the error which says that I "Can't assign to read-only property".
Yep, it's marked as read-only in the documentation.

Attribute Class

I have found threads that say to just update the ParentID of the element to the new parent and refresh both the old and new parent.
It would appear that those threads either had people guessing, or they weren't about attributes. That process would work for child elements.

14
Bugs and Issues / Re: GUIDs are case sensitive!
« on: March 20, 2026, 08:42:50 am »
When I programmatically create a connector between two operations, the referenced GUIDs are written in all uppercase in the StyleEx field of the t_connector table.
Then create them the way that EA creates them. This is a bug in your code regardless of what your opinion of how EA should behave.

15
PCS General Board / Re: OSLC PCS SynchProfile method ?
« on: March 18, 2026, 08:39:03 am »
EA Interop API provides a method to synchronize the MDG's stereotypes i.e. matching what one can do in EA via a right click on a stereotype in the toolbox  > Synchronize Stereotype
Example:    Repository.CustomCommand("Repository", "SynchProfile", "Profile=myProfile;Stereotype=test;");
Use the supported function instead on the EA side.

Repository.SynchProfile ("myProfile", "test");

is there a way to run this Synchronize command so that all tagged values matching the profile definition are created ?
No.

Pages: [1] 2 3 ... 542