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

Pages: [1]
1
I'm currently having an issue in an MDG where the Part Association in the MDG is not created with the AggregationKind set if drawn from the toolbox but set correctly if draw via the quicklinker.

The oddest part of the situation is that it works fine for me on two different machines one of which is virtual and a carbon copy of the virtual machines used by the Users suffering with the issue.
 base
Code: [Select]
<Stereotype name="Part Association" metatype="Part Association" ...>
<AppliesTo>
<Apply type="Association">
<Property name="_HideStype" value="Part Association"/>
<Property name="_MeaningBackwards" value="Part to Whole"/>
<Property name="_MeaningForwards" value="Whole to Part"/>
<Property name="compositionKind" value="Composite at Source"/>
<Property name="direction" value="Source -&gt; Destination"/>
.
.
.
<Stereotype name="System Function"... strictness="all">
<stereotypedrelationships>
<stereotypedrelationship stereotype="Common::Part Association" constraint="Common::System Function"/>
</stereotypedrelationships>
<AppliesTo>
<Apply type="Activity">
.
.
.
<Stereotype name="Functional Decomposition" notes="" ...>
<AppliesTo>
<Apply type="ToolboxPage"/>
</AppliesTo>
<TaggedValues>
<Tag name="Common::Part Association(UML::Association)" type="" description="" unit="" values="" default="Part Association"/>
.
.
.

2
Thanks Geert,

I did get this all working out in the end. The o in the field name was for old rather than object.  One of the many reasons to not use Hungarian Case.

3
Thanks to finally finding the right question and answer in the forum I can now say that using the line
Code: [Select]
dgm.Update(); does in fact work. though oddly in the case of Aggregations this adds on the navigability arrow head to the diagram.

4
I'm currently trying to prototype an EA Model Add-In to control the modification to Connectors on a diagrams.
What I have below triggers correctly tells you you've modified and asks the question.
The change to the connector information is updated correctly, as far as I can tell because of point 4 below.
However:
 1) The line
Code: [Select]
Repository.SaveDiagram(dgmID); seems to not do anything the diagram is still flagged as modified;
 2) The line
Code: [Select]
Repository.ReloadDiagram(dgmID); seems to not do anything the diagram is still flagged as modified;
 3) Replacing point 2 with
Code: [Select]
Repository.RefreshOpenDiagrams(true); cause EA to close without any notice;
 4) If you click Yes on closing the diagram to the save prompt, you get a new message saying your changing the connector from the new to the old again.

Any suggestions would be appreciated, or just shout if it's a bug that needs reporting.

Code: [Select]
const promptYESNO = 2
const resultYes = 3
const resultNo = 4
const dgmID = Repository.GetCurrentDiagram().DiagramID;

if (ot.val == EA.ObjectType.otConnector) {
if (this.oCon === GUID.val) { // Better double check we haven't changed context
let con = Repository.GetConnectorByGuid(GUID.val);
if(con !== null) {
let nSupplier = con.SupplierID;

if (this.oSupplier !== con.SupplierID) { //Supplier has changed
let oldSupplier = Repository.GetElementByID(this.oSupplier);
let nSupplier = Repository.GetElementByID(con.SupplierID);
let rsp = Session.Prompt("Connector supplier changed from " + oldSupplier.Name + " to " + nSupplier.Name + ".\n" +
"Are you sure you want to make this change?", promptYESNO);
if( rsp === resultNo) {
con.SupplierClientID = this.oSupplier;
con.Update();
Repository.AdviseConnectorChange(con.ConnectorID);
Repository.ReloadDiagram(dgmID);
nSupplier = this.oSupplier;
} else {
Session.Output("Saving diagram: " + dgmID);
Repository.SaveDiagram(dgmID);
}
}

// Set the old to new
this.oSupplier = nSupplier;
}
}
}

5
Firstly I must apologise for not having any images to provide aid.

I have an interesting issue if I run my template on a package using the "Generate Documentation" UI I get the correct generated output if I call the template programatically using the command;

Code: [Select]
docgen.DocumentPackage 30718, 0, "templateName"
Then the Template Fragment appears not to be called, the fragment calls a Document Script
Code: [Select]
documentDetails(#PACKAGEID#)
The template;
Code: [Select]
package>
1.1 {Pkg.Name}
{Pkg.Notes}
diagram >
< diagram
element >
attribute >
< attribute
< element
{Template - f_Detail}
< package

UPDATE:

If I remove the Template fragment and just process the package elements within the Template I get the same result, in other words, no output of the package elements when called using a script.

6
Thank you for confirming my thoughts Geert.

7
I was wondering if there is a way to constrain a developed MDG profile to restrict the number of relationships that can be created between Stereotypes.

As far as I can tell there is not at least without using Addins but would love to not.

For example (bad), a <<Level2>> Requirement may only be derived from a single <<Level1>> requirement.

8
General Board / Re: Finding Triggers of AcceptEvent (Actions)
« on: November 10, 2023, 09:03:34 pm »
Thanks both had to look at a simple model using your guidance.  Had to do some lovely string manipulation because we wanted the Specification of the Trigger returned but got there in the end.

9
General Board / Finding Triggers of AcceptEvent (Actions)
« on: November 10, 2023, 02:59:16 am »
I've searched through the tables in the SQL but can't find how Triggers and AcceptEvent objects are linked. For all other types of Actions it's the Classifier field but not for AcceptEvents. Any help is much appreciated.

Pages: [1]