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

Pages: [1] 2 3 ... 19
1
Yes, thank you Geert.

2
Need some help with this JavaScript:

Code: [Select]
function addElToDiag( element, diagram ) {
var diagObj as EA.DiagramObject;
var r = false;
let posL = 100;
let posT = 100;
diagObj = diagram.DiagramObjects.AddNew("l=100;t=100;", "");
diagObj.Update();
if (diagObj) {
diagObj.ElementID = element.ElementID;
diagObj.right = diagObj.left +100;
diagObj.bottom = diagObj.top +60;
diagObj.Sequence = 1;
diagObj.SetStyleEx("Selectable","1");
diagObj.SetStyleEx("Moveable","1");
diagObj.Update();
diagram.DiagramObjects.Refresh();
diagram.Update();
Repository.SaveDiagram(diagram.DiagramID);
Repository.ReloadDiagram(diagram.DiagramID);
r = true;
}
return r;

It should place a component in a component diagram, what it does. But something is wrong. The component cannot be selected and not be moved. Also the name is placed outside.

Any idea what I did wrong? My AI questions did not result in a solution.

If you like to see a stripped-down project for EA17 you may download the qeax file - testet with Firefox.
In package browser right-click on My Component package in the project/Detailed Design package and run the script add component to diagramm.
Thank you very mucn.

3
General Board / Failed to get EA::IDualApp interface [0x80029c4a]
« on: November 17, 2024, 11:59:38 pm »
When creating a new JavaScript script some default statements are generated.
When running that script without any changes it should prompt the user with "This script does not support items of this type.".
Instead in EA-17 it output on my computer "Failed to get EA::IDualApp interface [0x80029c4a]" in the System Output window.

What is wrong with my installation?

4
Running my JScript in EA17, that worked fine in EA16, led to
...
[42272393]      Agent: Started
[42272423]      Failed to get EA::IDualApp interface [0x80029c4a]
[42272425]      Microsoft Process Debug Manager creation Failed: 0x80040154
[42272425]      This is included as part of various Microsoft products.
[42272425]      Download the Microsoft Script Debugger to install it.
[42272425]      Failed to initialize JScript engine
[42272426]      Debug Session Ended


Could this be the same issue or should I look for a no-longer-supported version of the Microsoft Script Debugger?

5
Automation Interface, Add-Ins and Tools / save diagram as SVG
« on: November 22, 2023, 05:50:01 pm »
I was very happy to see that I - manually - can save a diagram as SVG in EA 16.1 by Publish/Save/Save-to-File.

How can I do that using the API?

SaveImagePage seems to know the output formats EMF, PNG, and JPG only.

6
The Find Orphans search is very helpful for cleaning up the content of a model. I follow the rule: "A model element must be mentioned at least in one diagram".

However, when I use a Data Type as an Item Conveyed for an Information Flow connection between two components and that Data Type is not placed in any other diagram, it is listed in orphans as well.

I would justify this as a bug in the search command, because the name of that element is mentioned on a diagram and therefore should not be listed as an orphan.

7
Do not know about EA SaaS. I just checked my checkbox there: Start/Prerences - a Preferences dialog opens. Select "General" from left tree menu.

Should look like this one.

8
General Board / need help with an SQL query
« on: April 28, 2023, 01:14:52 am »
I am looking for a query that finds all elements having a certain string in their stereotype name - EA 16.1, SQLite database.

Quote
select ts.Stereotype stereotype, to2.Name, to2.Object_Type "type" from t_stereotypes ts
join t_xref tx on tx.Description like '%' || ts.ea_guid || '%'
join t_object to2 on tx.Client = to2.ea_guid
where ts.Stereotype like '%<Search Term>%';

works, if I substitute <Search Term> with a stereotype name or a part of it.
When leaving the <Search Term> in, the SQL query does find anything.

Where is my problem?

9
 :)

10
I once I have seen, that you can configure something (I could not find) so that in the project browser window under a parent package, diagrams will be sorted above child packages. Default is the opposite.

Where is the checkbox of this magic option?

11
General Board / Re: How does EA store second stereotype?
« on: February 15, 2023, 05:51:30 pm »
thank you Geert, that works.

12
General Board / How does EA store second stereotype?
« on: February 15, 2023, 04:46:32 am »
I would like to find all stereotypes by an SQL query. Any idea?

13
General Board / Re: XML Schema Generation
« on: February 13, 2023, 03:15:56 am »
@Geert: here is the link to Imgur.com. But why this forum offers a button Insert image that puts the markup [img ][/img ] in the text? How can I use  [img ][/img ] to show an image directly?
@qwerty: Every other generation seems to be quite logic, except this one. Looks to me as a failure in generation. Maybe I should file an issue at Sparx.

14
General Board / Re: XML Schema Generation
« on: February 11, 2023, 04:49:29 pm »
@qwerty: May be I was not clear enough: I do not ask about a relation between UML and XSD. In my example model, the class Check has an association to itself. And its a zero-to-many relation. The XSD generator of EA translates my model to minOccurs="1" maxOccurs="1", while I expected minOccurs="0" maxOccurs="unbounded".

That is, the XSD generator of EA translates my model to a relation between the Check parent and its related Check children as if I had a one-to-one relation in my model. But that is not true. In the model it shows a zero-to-many relation between Check and itself. In the same way as there is a zero-to-many relation between the classes Check and Detail. The XSD generator translates that relation as I have expected. Why not for the Check:Check relation in the same way?

The question is: Is my understanding or model wrong or is the XSD generator of EA in error?

the image of the class diagram
I would love to show the model image here, but was not able to find a description, how the [img ][/img] markup works.

15
General Board / Re: XML Schema Generation
« on: February 11, 2023, 03:50:48 am »
As you may see, Geert, on the Check diagram the association contains zero-to-many (0..*).
This works fine in generation between two different classes but not in recursion.

To the model I have added a Detail table, Check table is the master. Both associations are zero-to-many, the recursive one and the one from Check to Detail.

The result is daunting. The zero-to-many in the recursion association is ignored. Instead a one-to-one association is generated:

Quote
<?xml  version='1.0' encoding='utf-8' ?>
<xs:schema targetNamespace="eu.ngong.Check" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="eu.ngong.Check" xmlns:ch="eu.ngong.Check">
   <xs:element name="Check" type="ch:Check"/>
   <xs:complexType name="Check">
      <xs:sequence>
         <xs:element ref="Check" minOccurs="1" maxOccurs="1"/>
         <xs:element ref="Detail" minOccurs="0" maxOccurs="unbounded"/>
      </xs:sequence>
   </xs:complexType>
   <xs:complexType name="Detail">
      <xs:sequence/>
   </xs:complexType>
</xs:schema>

I could not find an Multiplicity property other than at the Source or Target of an association. Do you mean a different one?

Pages: [1] 2 3 ... 19