How to draw only some Classes of an included PlantUml file?

0 votes
asked Nov 10, 2018 in Question / help by plantumlhappyuser
Hello everybody,

I'm starting to have a pretty big ERD.
So I tried to define all the entities (the tables) in one file (basically Classes with Attributes).
And then, I included that file in another file where I'm defining some relationships.
The purpose is to have focused relationships regarding related parts.

I would like to get drawn only the entities that are part of a relationship (the arrows) in this second file.
Thus I can do the same with other parts in subsequent files.

The include is working well, however once included, all the Classes are still rendered..
So basically I'm not able to do what I want.

I found a workaround by hiding in the second file all the classes I don't want to be rendered.
But the original scale is maintained, and doing this manually is very cumbersome and error prone.

Is there any solution to "define" some Classes in an included file so that I can reuse them in many files BUT without rendering them and having them rendered only for declared relationship (the arrows) in the including file?

Sorry for my bad english, I hope that my question makes sense...

Thank you very much.
commented Dec 7, 2018 by mgrol (2,620 points)
edited Dec 12, 2018 by mgrol

Hi,

this looks like a similar request like http://forum.plantuml.net/8380/only-render-drawing-canvas-to-the-size-of-visible-elements.

IMHO, this is currently not possible the way you were thinking of. Once you define a class it will be visible. 

What you could do is what you already proposed yourself. You would need to wrap your tables/classes into macros, which you can put into single files. These files you include and call those macros to "initialize" the table and connect them afterwards.

If you need a working example please send a PN with your email address. I will send you a zip file with a component diagram that will support you to get the idea.

BR,
Michael

1 Answer

0 votes
answered Dec 7, 2018 by plantuml (190,670 points)
You can use "remove" instead of "hide".

You may also be interested by the following discussion

http://forum.plantuml.net/7337/classes-then-show-only-classes-bearing-given-class-diagram
...