Author Topic: Apply Model Filters to specific diagram type permanently  (Read 1094 times)

ADucci

  • EA Novice
  • *
  • Posts: 16
  • Karma: +1/-0
    • View Profile
Apply Model Filters to specific diagram type permanently
« on: January 19, 2018, 07:29:21 pm »
I love the functionality of the model filters, specifically where you can automatically hide connectors which dont "belong" on a specific view (probably using the model type) -- is there any way to permanently create a rule that automatically applies a diagram filter to a specific type of diagram across the repository?

Thanks


PJK

  • EA User
  • **
  • Posts: 22
  • Karma: +0/-0
  • Transmisi me sursum, Caledoni
    • View Profile
Re: Apply Model Filters to specific diagram type permanently
« Reply #1 on: January 24, 2018, 02:05:50 am »
You can use the "Set Visible Relations" window (Ctrl-Shift-I) to permanently hide some connectors on a diagram. Not exactly what you are looking for (without writing a script), but it should be useful.
Cheers, Phillip

Nabil

  • EA User
  • **
  • Posts: 138
  • Karma: +5/-2
  • Customizing EA for you
    • View Profile
    • View My LinkedIn Profile Here
Re: Apply Model Filters to specific diagram type permanently
« Reply #2 on: January 24, 2018, 11:23:19 pm »
Hey ADucci,

Are you saying you want to hide all connector on a specific diagram type? If yes extend a diagram and set Show Relationships False

Also check model validation http://www.sparxsystems.com.au/enterprise_architect_user_guide/13.5/automation/model_validation_broadcasts.html can be handled better from an Addin

http://www.sparxsystems.com.au/enterprise_architect_user_guide/13.5/automation/ea_onrundiagramrule.html

HTH
Nabil

Sparx Systems India - Services
Ultimate Guide EA14 | Consulting | Training Plans

ADucci

  • EA Novice
  • *
  • Posts: 16
  • Karma: +1/-0
    • View Profile
Re: Apply Model Filters to specific diagram type permanently
« Reply #3 on: January 25, 2018, 06:37:22 pm »
Thanks Nabil, Philip.

I will look into these as a solution.  And Yes. I have extended Sparx to create my own diagram types i.e profile::behavior_view and profile::structure_View, and as a rule... i never want to see structure connectors on a behavior view and behavior connectors on a structure view (something like that... )

I was looking at the diagram filters and its so close to what I want.. just that you cannot create a filter on (Diagram type AND connector type)

I think the script idea is best (EA_OnRunDiagramRule)  --

Its just strange that other Sparx Users dont find that they have this same requirement -- I know how to hide connectors on a single diagram, but we have so many diagrams that I wanted a standard rule.

Cheers.

kdm

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: Apply Model Filters to specific diagram type permanently
« Reply #4 on: March 13, 2018, 04:35:09 am »
Hi,
I have similar requests.
you can create an own MDG and define your own connectors.
In the shape script of the connector you can check the current diagram

shape main
{
if(hasProperty("diagram.mdgtype","myMDG::diagram-name"))
{
// implement your connecor drawing here für this diagram
    moveto(0,0);
    lineto(100,0);
} else{
// if now drawing is defined here the connector isn't shown
}

}