plantuml-stdlib / C4-PlantUML

C4-PlantUML combines the benefits of PlantUML and the C4 model for providing a simple way of describing and communicate software architectures
MIT License
6.41k stars 1.1k forks source link

Separating model and view #353

Closed NathanDotTo closed 6 months ago

NathanDotTo commented 6 months ago

Hi

I would like to achieve an outcome such that I can define common model elements - systems, containers, components - in a model.puml file and reuse those model elements in other model files, but not have the reusable model elements rendered unless I explicitly want them to be.

This is intended to allow model elements to be defined in one place, and used in other parts of the overall system model in a way that is consistent.

I can create model elements in a file, and include that file in other files. That is fine. But, the model elements from the included file are all rendered. This is as expected given current functionality.

It is conceivable, I think, that there are other possibilities.

For example, there could be a form of !includeInvisible such that the included elements are not rendered by default, but are rendered when used in a Rel of some sort. I haven't found documentation that descried the !include functionality, so I have not been able to check whether this exists already.

What do others think please? I realise that there might be a better forum for such questions, so please feel free to direct me elsewhere with this question as appropriate.

Thanks

Nathan

kirchsth commented 6 months ago

Hi @NathanDotTo,

I think PlantUML Q&A is the best place if you have PlantUML specific questions, findings, ...

In concrete I found remove @unlinked which could solve your problems. But during some fast checks I found following problems

Best regards Helmut

NathanDotTo commented 6 months ago

Thank you :-)

gobravedave commented 6 months ago

I have built developed something similar using a collection json files.. See https://github.com/gobravedave/C4-Plantuml-Helper for reference.

NathanDotTo commented 6 months ago

Thanks! :-)

On 4 May 2024, at 00:24, gobravedave @.***> wrote:

I have built developed something similar using a collection json files.. See https://github.com/gobravedave/C4-Plantuml-Helper for reference.

— Reply to this email directly, view it on GitHub https://github.com/plantuml-stdlib/C4-PlantUML/issues/353#issuecomment-2093837763, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADGFXFXATLKZ5KO4UMV5XK3ZAQFB7AVCNFSM6AAAAABHFKI22SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJTHAZTONZWGM. You are receiving this because you were mentioned.

Potherca commented 6 months ago

For future reference: It is also possible to use the Subpart feature to only include part(s) of the central reference file.