Sparx Systems Forum
Enterprise Architect => Suggestions and Requests => Topic started by: ADucci 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
-
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.
-
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 (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 (http://www.sparxsystems.com.au/enterprise_architect_user_guide/13.5/automation/ea_onrundiagramrule.html)
HTH
Nabil
-
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.
-
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
}
}