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

Pages: [1] 2 3 ... 50
1
General Board / Re: Generate parts by associations through scripting
« on: October 04, 2024, 05:22:04 pm »
Yes its an embedded element (child of the block).

You will have to create the part element in your script and set its Parent_ID equal to the owning Block Element_ID.

BUT ... the "EA magic" that keeps the part association role name and multiplicity in sync is handled within our good old friend t_xref. The exact details I don't remember, its something like

XrefID,Name,Type,Visibility,Namespace,Requirement,Constraint,Behavior,Partition,Description,Client,Supplier,Link,

{BF1D8DE6-5274-40b0-AD03-7B05C4B6B036},CustomProperties,element property,Public, , , , ,0,@PROP=@NAME=_connectorRef@ENDNAME;@TYPE=string@ENDTYPE;@VALU=<SOURCE>@ENDVALU;@PRMT=@ENDPRMT;@ENDPROP;@PROP=@NAME=isReference@ENDNAME;@TYPE=boolean@ENDTYPE;@VALU=0@ENDVALU;@PRMT=@ENDPRMT;@ENDPROP;,{31294601-A49A-438f-AD49-59030143FD21},{DD41CA65-BE91-481b-919C-17AB0DFDB25D}, ,


In your script you will have to create this entry in t_xref which will involve you creating a new guid for the new t_xref record.

Have fun!

Phil


2
General Board / Re: Class operation parameter types
« on: September 05, 2024, 09:01:00 pm »
Here's what I found in t_xref for a test parameter multiplicity of 1..*

XrefID,Name,Type,Visibility,Namespace,Requirement,Constraint,Behavior,Partition,Description,Client,Supplier,Link,

{D8433594-6904-416a-B247-DA7EC76655B5},CustomProperties,parameter property,Public, , , , ,0,@PROP=@NAME=lower@ENDNAME;@TYPE=Integer@ENDTYPE;@VALU=1@ENDVALU;@PRMT=@ENDPRMT;@ENDPROP;@PROP=@NAME=upper@ENDNAME;@TYPE=UnlimitedNatural@ENDTYPE;@VALU=*@ENDVALU;@PRMT=@ENDPRMT;@ENDPROP;@PROP=@NAME=isUnique@ENDNAME;@TYPE=Boolean@ENDTYPE;@VALU=0@ENDVALU;@PRMT=@ENDPRMT;@ENDPROP;,{4E9BC795-3D5A-4eb7-A916-65648B6F004E},<none>, ,

The multiplicity encapsulated within the Description field is here:

@PROP=@NAME=lower@ENDNAME;@TYPE=Integer@ENDTYPE;@VALU=1@ENDVALU;@PRMT=@ENDPRMT;@ENDPROP;@PROP=@NAME=upper@ENDNAME;@TYPE=UnlimitedNatural@ENDTYPE;@VALU=*@ENDVALU;@PRMT=@ENDPRMT;@ENDPROP;

t_xref.Client is the GUID of the operation parameter

t_xref.Type = parameter property

So

1) Extract required row(s) from t_xref using a SQL Query
2) Split t.xref.Description into its parts using ; storing in a String[]
3) Extract the info you want from the String[] using subscripts (you can work out the value from the above example) ...


Hope this helps

Phil

3
One possibility is:

1) Create a Signal element with an attribute rate and default value equal to your rate
2) On the SysML Connector between the parts, use EA's Information Flow Realized and set that to your Signal

The effect is a solid black triangle pointing in the direction of the Connector labelled with the name of your signal (I do not believe however there is a way to show the attribute and initial value)

There is a cheat and name your Signal rate = 1G / sec  ;)

Phil

4
Hi

Yes me too!

I developed a Model based Add-in which uses Session.Prompt in addition to Session.Output

Both "freeze" with the "blue circle of death" ... eventually EA will respond to the user click, say OK in the Session.Output.

I have found, that when "freeze" happens, clicking the EA title bar, springs EA back into life and the user interact with the dialog. Not ideal.

As this was for a client, I reverted to write the addin as a conventional C# dll

Phil

5
Wot qwerty said plus you may find the following fields useful as well to filter out baselines for other documents stored within the t_document table

t_document.DocID       : which despite its name is actually a GUID (the guid of the actual document entry?)
t_document.ElementID : which despite its name is actually a GUID (the GUID of the baseline?)
t_document.DocName  : the name of the baseline
t_document.DocType    : this has the value Baseline for a Baseline in the t_document table

Phil

6
Hi

In EA v16, you can create an Association between two Blocks and then use Information Flows Realized to specify what is flowing between the blocks:

BUT

You can only use classifiers such as Blocks and Value types, You cannot use any classified type and such as a Value Property like liquid : Water

I cannot find a way round this, unless I name a Value Type as liquid : Water (which I don't like).

Phil

7
Hi Jan

Apologies I found your JavaScript version just after posting my previous message :)

Thanks again for both versions of this script

Phil

8
Hi Jan

Fantastic! Thanks a lot.

Does anyone out there have a JavaScript version of this?

Phil

9
Hi

Sparx EA does not enforce the structure you describe. By default when you add a BPMN 2.0 diagram to a package you should see a dialog asking whether you want to

a) Create the diagram as a child of "model" element (as you have done)

OR

b) Create the diagram directly in the package (this is what I do)

If you choose option b) then Time Aware modelling should work fine.

BUT there is a checkbox Do Not Show this Dialog Again (or similar wording), if in the past you have checked this, then that would explain why you always get option a)

I am unsure how to "uncheck" the Do Not Dialog Again option, but maybe someone else here has that answer  :)

Of course, having created your structure, as per option a), you could always move things around to get option b).

Phil

10
Thanks

I have solved my own problem  :)

The ID of the navigation cell linked diagram ID is in PDATA1, but this must be stored as an Int32 and then everything works just fine!

Phil

11
Thanks

I have solved my own problem  :)

The ID of the navigation cell linked diagram ID is in PDATA1, but this must be stored as an Int32 and then everything works just fine!

Phil

12
This is a long shot, but does anyone out there know where in the repository database are the details of the Navigation Cell Hyperlink property is stored?

I cannot find it anywhere ... its not t_xref

I would like to know for an add-in I am creating which needs to manipulate Navigation Cells.

I have found that the ID of the diagram the Navigation Cell links to is held in the PDATA1 field of the t_object table for the Navigation Cell entry. But this is not the complete picture.

Phil

13
I have just noticed this as well

On a related topic, where in the repository database are the details of the Hyperlink property stored?

I cannot find it anywhere ...

I would like to know for an add-in I am creating which needs to manipulate Navigation Cells.

I have found that the ID of the diagram the Navigation Cell links to is held in the PDATA1 field of the t_object table for the Navigation Cell entry. But this is not the complete picture.

Phil

14
General Board / Re: Toolbox is not working
« on: January 05, 2024, 01:14:15 am »
Have you tried clicking the >> icon (just above the Sparx Logo Start Page)

This hides / shows the toolbox

In my EA install toolbox is hidden by default, maybe this is your issue?

Phil

15
Automation Interface, Add-Ins and Tools / Close the Search Window
« on: December 05, 2023, 11:42:28 pm »
Hi All

It is possible to display results from a SQL Search within a Script to the Search Window.

BUT it appears there is no way to close the Search Window within the Script.

On the first execution the results display correctly, but on all subsequent executions, blank rows appear s the last rows in the Search Window.

Does anyone know how to close the search window within a script? I am using EA  16.1 latest build 64 bit and my script is written in JavaScript.

Many thanks
Phil

Pages: [1] 2 3 ... 50