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

Pages: [1]
1
I've created a C# AddIn that looks up an image path from a tagged value and displays the image in a dockable window. The image in the window changes when different elements are selected.

Now, I'd like to do the same, or similar, within a Model Addin. I can see how to add groups and text fields but not an image.

1) Is it possible in a Model Addin?
2) How can it be done?

My thoughts are there's an XML property of type=image. Perhaps I can use an image asset to link into that XML. Perhaps I can load the image from a local directory as I did with the C# addin.

Best Wishes,

Matt.

2
I used a script to create a GlossaryCategory package and put a GlossaryEntry element in it. The new GlossaryEntry is not recognised as a glossary term after clicking Reload Glossary from its context menu. My script is below.

When I use Add Element... to create a GlossaryElement in my new GlossaryCategory package it is recognised as a glossary term after clicking Reload Glossary.

I've checked many properties of the not working, script created GlossaryEntry against the properties of the Add Element created one and cannot spot any difference. Tried in v15.2 and v16.1.

Has anyone been able to create a Model Glossary Entry (not a Repository.Term) using a script?

Creation code:
Code: [Select]
Set newPackage = mdalPackage.Packages.AddNew("NewCategory", "")
newPackage.Update
newPackage.StereotypeEx = "Glossary::GlossaryCategory"
newPackage.Update

Set newElement = newPackage.Elements.AddNew("AardvarkA", "Entity")
newElement.Update
newElement.Stereotype = "Glossary::GlossaryEntry"
newElement.Update

Properties test code
Code: [Select]
Session.Output("Name:"&elem.Name & " Stereotype:"&elem.Stereotype&" StereotypeEx:"&elem.StereotypeEx&_
" FQStereotype:"&elem.FQStereotype&" ObjectType:"&elem.ObjectType&" Type:"&elem.Type&" FQName:"&elem.FQName&" Subtype:"&elem.Subtype)

3
My MDG Technology has element and connection stereotypes defined as usual and all works for the most part. When I click on a blank area of a Profile diagram type, its custom name (Profile::DiagramName) appears in the status bar in the bottom left corner of EA. When an element with an MDG stereotype is selected on a diagram its custom name (Stereotype name only) appears. When a connector with an MDG sterotype is selected on a diagram its metatype name appears in the Status Bar.

Is there a way to alter the connector name shown in the Status Bar to match the MDG's stereotype? I've tried _alias attribute in the connector's attributes.
Is there a way to show the Profile name of the element down there too as per the diagram? (Less important, but nice to have consistency with diagram naming).

4
Automation Interface, Add-Ins and Tools / MDG Diagram Type Groups
« on: October 04, 2022, 07:19:14 am »
I'm creating an MDG technology. I have lots of diagram types that I would like to group when they appear in the New Diagram dialogue.

You can see the effect I'm looking for in this diagram where five diagram types are grouped into Class.



TIA

Pages: [1]