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

Pages: [1]
1
Hello

Question to use of API for CreateBaseline. API Doc http://www.sparxsystems.com/enterprise_architect_user_guide/13.0/automation/project_2.html describes the requirement to first parameter "PackageGUID: String - the GUID (in XML format) of the Package to Baseline". I found some example for jscript but not for Java API.
I do call
org.sparx.Package packageSel = m_repository.GetTreeSelectedPackage();
...
m_repository.GetProjectInterface().CreateBaseline(packageSel.GetPackageGUID(),startDate, baseLineNoteStr + startDate);

and it runs seemingly well, but I'm not sure if I use the api well.
Can someone confirm or please describe correct use of api.

Thank you  in advance
Pegasus

2
Hello,

I guess I don' see teh forest for the trees...  But I need urgent suggestion

In my HybridScript I added support for baseline nad did static on most "constants" I defined inside my script

org.sparx.Package packageSel = m_repository.GetTreeSelectedPackage();
...
m_repository.GetProjectInterface().CreateBaseline(packageSel.GetPackageGUID(),startDate, baseLineNoteStr + startDate);

 and first time all works right, but suddenly I get following crash message...

java.lang.NoSuchMethodError: Unable to find GetTreeSelectedElements
at org.sparx.Repository.comGetTreeSelectedElements(Native Method)
        at org.sparx.Repository.GetTreeSelectedElements(Repository.java:788)
        at SparxSystems.RepositoryInterface.syncEaWithPtcData(RepositoryInterface.java:1665)
        at SparxSystems.RepositoryInterface.main(RepositoryInterface.java:1768)
[Loaded java.lang.Shutdown from shared objects file]
[Loaded java.lang.Shutdown$Lock from shared objects file]

I deleted the libs eaapi.jar and SSJavaCOM.dll inside my local "lib"-package, but nothing changes.

3
Hallo,
currently I don't know what doing wrong (maybe lack on knowledge of java). I run Update() on a locked element (HybridScript in JAVA) and get an exception

Exception in thread "main" java.lang.Exception: Element locked
at org.sparx.Element.comUpdate(Native Method)
at org.sparx.Element.Update(Element.java:1077)

I surround the elem.SetName and following Update-call with try ... catch (Exception e) and get the message displayed, I put inside catch-block. But nevertheless the script ends with the (stacktrace) messages above. What I expect is, that I can catch the exception and coninue in script sequence. Maybe I catch the wrong Exception-Type. But if so, what will be the right one? I don't know a source describing the JAVA API

Thanks for support

Pegasus

4
Hello,

I just tried to use VB Scripts (diagram goup) changing line style of connectors in a diagramm adapted in EA V12.x inside EA V13 and it seems nothing to be changed. Using same Modell with EA 12.1 it works furthermore fine. Does something changed in API with release EA V13...? 

Thanks
Pegasus

5
General Board / SQL - Macro #Branch#: Result entire model
« on: January 14, 2017, 12:44:21 am »
Hello,

I am just testing #Branch# Macro with some case
and is see that result seems to be entire modell wheater if selected package contains further packages  or not? I expecte #Branch contains
Query:
select o.ea_guid AS CLASSGUID, o.Object_Type AS CLASSTYPE, o.name, o.ea_guid, o.Object_type AS Type, o.Stereotype, o.Author, o.modifiedDate AS Modified, o.note AS [Notes] FROM t_object o, t_package pkg WHERE pkg.Package_ID IN (#Branch#)

from user guide
http://sparxsystems.com/enterprise_architect_user_guide/13.0/model_navigation/creating_filters.html
Gets the IDs of the child Packages of the currently-selected Package, working recursively down to the lowest level of sub-Package. For example:
t_object.Package_ID IN (#Branch#)

Thanks
Pegasus

6
Hello,

I don't understand API for modifiy (update) tagged values.  (EA 13)
What I want is to update existiing Tagged Values if content changed  see part of my code (part of function call)...

Collection<org.sparx.TaggedValue> elemTaVs = eaElem.GetTaggedValues();  // what means read only`?
...
tv_ptcModifDate = elemTaVs.GetByName( eaPtcFNameModifDate ); // returns null if not found
tv_ptcModifDate.SetValue( "new Date" );
if (tv_ptcModifDate.Update()) {
  updateCount++;
}

but new value isn't set in Modell (seen by Wizard in Model)

Thanks for support
Pegasus

7
Hello,

there are some contratictory topics to question how to get in projectbrowser selected Obejcts (e.g. packages, requirements/elements); e.g. http://sparxsystems.com/forums/smf/index.php/topic,30519.msg222208.html#msg222208 [Geerd] and http://sparxsystems.com/forums/smf/index.php/topic,5050.msg123251.html#msg123251 [Aaron]. I do have same problem. In EA 13 using Java API GetTreeSelectedElements returns collection with e.g requirements only not also selected packages, so I assume there isn't an interface returning collection of selected "objects" [in project-browser]. But how is it possible to recognise multiple selections of "objects" e.g. packages and elements at once

Thanks for support and elucidation
Pegasus

8
Hello,

Preferences: I'm not realy familar with java, but need to use it to access via an API to an external applikation (PTCIntegrity)

I try to run from easy to more complex example (based on hyperscript example from Sparx using java)
I try to run first on packages and read TV (if exist) but I get Exception if I try to print of name of Element (package) of a root (Model) package....   I am not sure if I understand API at all.,
Where come e.g. GetPackages() from and how do I get access on e.g. isModel. I don't see this methods in online help (automation interface/Package package, ..)
If I understand right, I do have first getPackages(collection) than iterate with GetAt(idx) collection and call pgk.GetElement() to get access to e.g. TV. To get the TV for one element I do need a new collection TaggedValue filled by element.GetTaggedValues() ?

Where do I went wrong.
Sorry,  if my description isn't well english and confuse, but it reflects my current problem in understandig API
Tanks in advance for support and hints



9
Bugs and Issues / Create diagram with use alias
« on: November 24, 2016, 11:54:15 pm »
Hello,
I trie to find the place(dialog) in EA V13.0.1305 where to configure that when creating new diagramm (browser/"add diagram") checkbox Properties/Diagram: "Use Alais if Available" and "Show Diagram Details" are selected (preset). Currently I do have to change manually for each diagram.
Thanks for support in advance

Pegaus

10
Bugs and Issues / CSV-Import: DAO.Fields [3265]
« on: November 24, 2016, 07:54:32 pm »
Hello,

I do import (EA 13.0.1305) from excel/csv-file with hierarchical informations (CSV_KEY/CSV_PARENT_KEY) and get following message DAO.Fields [3265] Element in dieser Auflistung nicht gefunden. If export results (including GUI-ID) from EA into csv-file and compare this file wiht the i did the import with, I don't see differences. But what cause this messages. I fear inconsistency in data?

Thanks for feedback in advance
Pegasus

11
Bugs and Issues / CSV import with preserve hierarchy
« on: November 08, 2016, 07:45:38 pm »
I do have a problem with CSV import and the colums CSV_KEY and CSV_PARENT_KEY.
Scenario: I import data from a separate "Requirement management" system exported to Excel. this system exports ID and hierarical relations as reference to the actual numerical ID. To import in EA(13) it is necessary to write into CSV_KEY the name of the element and in CSV_PARENT_KEY the name of the parent element. Unfortunaltely it is not possible to use own identifier. So I get warning if e.g. the parent is a package wit name XXX and the underlying element (Requirement) has identical name XXX. Do I something wrong. If not than it is desirable that SPARX adds possibility to use selfdefined token also numerical values for CSV_(PARENT_)KEY.

12
General Board / How to generate "Line-Diagrams" for Reporting
« on: March 10, 2016, 03:06:47 am »
Hello,

maybe I'm totally confused. I want to use Time series chart to depict graphically the progress of implementation of e.g. requirements based on steps I defined e.g. every delivery from supplier. This diagram has to be refreshed, when generating a new report (headword: virtual documents). But the time series chart element generates results seemingly based on execution. This ist not what i need. Does anyone know how to generate such graphics within EA (12.1/1228)?

I need a tip urgently, thanks in advice

Pegasus

13
General Board / Check Project Data Integrity Recover/Clean runs to EA crash
« on: February 25, 2016, 01:31:01 am »
Hallo,
the Function "Check Data Integrity Check" finds some problems  on object features an Connectors (EAP-file). A run on recover/clean of Object Features works, but if I start recover/clean on Connectors (also separate), EA (Version 12.1 - 1228) crashes (-> Dialog with order to close program).
The check finds "invalid lin geometry (Missing Diagram) and Invalid connector (Association) the proposed Action is always deletion. I find in my backup no version with connector-Problems that runs recover/clean without crash.
...?

Pegasus

14
Hallo,
I want to change the type of Requirement to a type, which has been defined in my own MDG Technology which uses SysML 1.4 and added tagged values(seperate tab in Properties-Dialog beside SysML1.4-tab).
Proceeding: 1. I export the Requierement via MDG Integr. for MS Office Excel-Exporter to excel File (with GUID). 2. Change the Stereotype to the desired "funktionaleAnforderung" 3. Reimport via MDG Integr. for MS Office (successful)
Result: A lot of Requirements changed type, but some Requirement elements doesn't changed (seen in diagram). In Projektbrowser i do see first the desired stereotype, but after selekting in projektbrowser it resets to origin requirement stereotype <<requirement>>. Exporting it again, shows the desired stereotype for all Requirements.

What happens...?  Using EA Version 12.1 (1225), some Requirements in foretime with EA 11 created
Thanks
Pegasus

15
I do have created my own MDG based on SysML. Unfortunatly it seems not be possible to say something like use MDG SysML and extend it. No metaclass have to be an UML Type and use SysML by Generalisation like described in Help(Extension ...). But on my own defined Diagramm ( metaclass Diagram_Logical)  i do have the effect that the Arrow(deals with FlowProperty in SysML) on the Port-Element is not shown. The link of the same Element in a SysML BDD shows them. I believe that there is a dependency to a Shape-Script in relation to the diagramtype. But i do not know where and i don't want to reimplement SysML-BDD appearance. How can I reuse direct the MDG SysML diagramtypes in my own MDG with a different name to connect it with my own toolboxes and to be select by e.g. the New diagramm Dialog (Select from <myMDG>)

Thanks 
Pegasus

Pages: [1]