In order to accomplish this behaviour you can apply different approaches in ADOxx depending on the interaction planned for the user. Please find hints and examples on the implementation below.
a) View modesView modes can be defined by model type. A view mode represents a subset of modelling classes/constructs available and can be defined within the library attribute "Modi". When switching the view mode, the classes part of the view mode are available and shown, those excluded are greyed out and not considered in exports and the like (you can also change the behaviour to completely remove them by changing a view mode configuration option in the Modelling Toolkit using the Menu "View" -> "Mode" -> "Display ..." and adapt the settings there)
Details on the implementation of view modes are available at
FAQ:
http://www.adoxx.org/live/faq/-/message_boards/message/20030Documentation:
http://www.adoxx.org/live/model-typesb) VariantsSimiliar as views, but on object level, resulting in "filtered views" of the model content.
Further details are available at:
FAQ:
http://www.adoxx.org/live/faq/-/message_boards/message/110910c) Subgraph Expand/ShrinkAnother option to realize the behaviour related to the "Show submodel" functionality as a context menu on modelled instances (see the "Sub-Process" class for an example implementation). The logic is to move the add-on elements of your model to another modeltype and reference it using a INTERREF attribute on model level.
To realize this functionality, please follow the steps below:
i) Define the INTERREF attribute and include it in the ATTRREP
ii) Define the Model pointer class attribute to hold as a default value the name of the INTERREF attribute
iii) This definition enables the "Show/Hide submodel" funtionality and also the model navigation via "<Ctrl>+double click"
ABL:
https://www.adoxx.org/svn/all-repo/5_ADOxx_SupportLibraries_ADOxx13UL1/ShowExpandSubModel_ADOxx13UL1/BIN/ExpandShrinkLibrary.ablADL:
https://www.adoxx.org/svn/all-repo/5_ADOxx_SupportLibraries_ADOxx13UL1/ShowExpandSubModel_ADOxx13UL1/DOC/ExpandShrinkModels.adl