|
|
Generate Interface Diagrams |
This helper generates interface diagrams from blocks that have proxy ports and interfaces.
|
Applicable To |
Block, Package,
ObjectModelDiagram (Block Definition Diagram) |
|
Menu
Entry |
Power
Pack Diagram Tools Generate Interface Diagram(s) |
|
Demonstration |
For each selected block or blocks in selected packages, or blocks on selected diagrams, the helper generates an interface diagram. The diagram is a block definition diagram named [BlockName] Interfaces and is created in the same package as the block.
The diagram has the following properties set:
General.Graphics.DefaultBoxView = Specification
ObjectModelDiagram.Class.ShowPorts = True
ObjectModelDiagram.Class.ShowPortsInterfaces = True
ObjectModelDiagram.Class.ShowAttributes = None
ObjectModelDiagram.Class.ShowOperations = None
Note that the
properties above affect both Blocks and Interface Blocks (Rhapsody cannot
distinguish between them). For this reason, the helper directly overrides the
graphical properties of Interface Blocks on the diagram, based on their
content. If an interface block has either flow properties or attributes, then
it is set to show all attributes (there is no way to set separate display
options in the API) otherwise it is set to show none. The same is true for
operations / event receptions which appear in the same category.
Note that although
these properties are set, they do not affect Interface Blocks (which Rhapsody
doesn’t see as Interfaces but as Classes)
ObjectModelDiagram.Interface.ShowAttributes = None
ObjectModelDiagram.Interface.ShowOperations = All
The diagram is then auto populated with:
· The block.
· Any interface block that types one of its proxy ports.
By default, interfaces on the diagram are automatically colored to distinguish them from blocks. This may be configured using the following properties (these may be set at package or project level):
RhapsodyPowerPack.GenerateInterfaceDiagrams.ApplyColorToInterfaces
RhapsodyPowerPack.GenerateInterfaceDiagrams.InterfaceColor
Existing diagrams are detected by name and if present are simply updated (additional interfaces are added and formatting mentioned above is reapplied)