How to apply a parameter according to diagram type

0 votes
asked Jul 19, 2023 in Question / help by Brinfer (120 points)

Hi, there,

I have a file containing all the parameters of my diagrams that I pass using the `conf` option.
This file is common to all my diagram types (sequence, class ...).

The problem is that one of these parameters causes an error on my sequence diagrams (the `set namespaceSeparator`).

So I'm wondering whether it would be possible with the preprocessor to apply or not this parameter depending on the type of diagram.

Thanks in advance for any answers.

1 Answer

0 votes
answered Jul 19, 2023 by plantuml (295,000 points)
A temporary solution would be that we simply ignore this setting in sequence diagram. Would that help?
commented Jul 19, 2023 by Brinfer (120 points)
How can I ignore a parameter?
The idea would also be to avoid having to put parameters in each of my diagrams.
commented Jul 19, 2023 by plantuml (295,000 points)

How can I ignore a parameter?

Unfortunately, you cannot.

Note that your example is working with lastest version.

Could you give us a non-working example?

Thanks!

commented Jul 19, 2023 by Brinfer (120 points)

Here my conf.txt file

set namespaceSeparator ::

Here a working class diagram:

@startuml class_test
namespace space {
    class A
    class B
}
space::A -- space::B
@enduml

And here a not working sequence diagram:

@startuml sequence_test
participant A
participant B
A -> B
@enduml

Note:

  • The command line I'm using:
java -jar <path_to_folder>/plantuml.jar -config ./conf.txt -tpng <my_file>.plantuml
  • My version of Java:
openjdk version "11.0.19" 2023-04-18
OpenJDK Runtime Environment (build 11.0.19+7-post-Ubuntu-0ubuntu122.04.1)
OpenJDK 64-Bit Server VM (build 11.0.19+7-post-Ubuntu-0ubuntu122.04.1, mixed mode, sharing)
  • My version of PlantUML:
PlantUML version 1.2022.7 (Mon Aug 22 19:01:30 CEST 2022)
Dot version: dot - graphviz version 2.43.0 (0)

I know this isn't necessarily the most recent version (which may explain my problem) but I can't use the PlantUML server, and I can't really afford to change the PlantUML version.

...