how to set "left to right direction" from command line?

0 votes
asked Nov 16, 2022 in Wanted features by valexiev (1,200 points)

I want to use left to right direction for a certain diagram that I generate with a tool. command-line has this:

  • DVAR1=value To set a preprocessing variable as if '!define VAR1 value' were used 
  • Sparam1=value To set a skin parameter as if 'skinparam param1 value' were used 
  • Ppragma1=value To set pragma as if '!pragma pragma1 value' were used

Unfortunately left to right direction is neither of these 3. So there is no way to set it from the command line, and I have to insert it as second line of the source puml file?

1 Answer

+1 vote
answered May 13, 2023 by kirchsth (4,960 points)
selected May 14, 2023 by valexiev
 
Best answer

Maybe too late, but you could use an !if depending on e.g. -DLEFT_TO_RIGHT
e.g. you could use following sample.puml diagram

@startuml

!if %variable_exists("LEFT_TO_RIGHT")
  left to right direction
!endif

user1 --> (Usecase 1)
user2 --> (Usecase 2)

@enduml

and start it with or without -DLEFT_TO_RIGHT

java -jar plantuml.jar -DLEFT_TO_RIGHT sample.puml

java -jar plantuml.jar sample.puml

BR Helmut

...