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.


Topics - ngong

Pages: [1] 2 3 ... 9
1
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.

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

3
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.

4
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.

5
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?

6
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?

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

8
General Board / XML Schema Generation
« on: February 03, 2023, 02:13:17 am »
Seems like an error - or do I do something wrong?

I am trying to generate an XML Schema with an recursive element.
You may download a qea file that demonstrates my problem.

It generates
Quote
   <xs:complexType name="Check">
      <xs:sequence>
         <xs:element ref="Check" minOccurs="1" maxOccurs="1"/>
      </xs:sequence>
   </xs:complexType>
where it should generate
Quote
   <xs:complexType name="Check">
      <xs:sequence>
         <xs:element ref="Check" minOccurs="0" maxOccurs="unbounded"/>
      </xs:sequence>
   </xs:complexType>

Is that a flaw of the XSD generator in EA or my fault anyhow?

9
General Board / Repository Schema ER diagram
« on: January 25, 2023, 10:26:53 pm »
Is there a kind of ER diagram about the schema of the model repository?
I am currently trying to do an SQL query about the relation of a connector in a State Chart to a Trigger. I found the Tigger name in the PDATA1 field of the connector. However that may not be unique. I could not identify the Tigger Object_ID related to the Connector_ID in any other table.

10
General Board / Start Page of a Project
« on: January 15, 2023, 10:55:43 pm »
Is possible to have a certain diagram that shows up automatically at the time when EA loads a project?

11
General Board / Duplicate profile name
« on: January 07, 2023, 12:47:02 am »
WARNING: Duplicate profile name: MyProfile UML Profile, detected in technology ID: 22B21552-1

When opening this model, I get this message.
Yet, I can not find any problem with the model.
In Browser/Resources/UML Profiles and in Manage Technologies that profile appears only ones.
Is it save to ignore the warning?
Any idea to get rid of it?

Rolf

12
General Board / ProCloud Server initial image generation
« on: December 06, 2022, 05:49:23 am »
On the ProCloud server machine, when I copy an existing model to the C:\Program Files\Sparx Systems\Pro Cloud Server\Service\Models folder,
how can I initially generate all images?

13
General Board / Hybrid Scripting: How to change the Build Script?
« on: December 04, 2022, 05:09:59 am »
I downloaded automation.pdf and tried to do the Java Example of a model script.

However, on my computer there is a different Java JDK installed as expected by the example. I am using JDK-17.2 instead of 1.8.0.
Should not be a big thing, if I could find where to change the Build Script.

Or.: What do I have to read to understand what the Build link really does in the mentioned example?

14
General Board / How to Clear Stereotype
« on: November 29, 2022, 09:34:11 pm »
I have my profile to import my stereotypes.
Now, I deleted one of my stereotypes from my profile an imported my profile again.
Unfortunately I have not reset all usages of the deleted stereotype prior to importing my profile that misses it.

I could not find a way to reset the stereotype at the using elements.

How to clear the stereotype field of an object, if the stereotype no longer exists in any profile?

15
General Board / feap file as ODBC source
« on: November 23, 2022, 03:36:58 am »
From Sparx for EA16 I can download the EABase1558.feap file.
It is an empty EA repository and Firebird database file that I can open with EA16.
Selecting it in Win10 as an  ODBC Source (File DSN),  for the connetion string, I am asked for a User/Password/Role.

Any idea what to enter there?

Entering nothing does not create the connections. Also SYSDBA/masterkey does not work.

Pages: [1] 2 3 ... 9