Skip to main content

PlantUML other commands

There are several other commands useful along with core commands for styling and layout. 

' List all ArchiMate icons

@startuml

listsprite

@enduml

-----------------------

' Layout of the elements 

top to bottom direction

' New way of defining style of the elements. Style can be defined for all elements or specific type of element or an annotated element

<style>

element {

FontColor: green;

}

rectangle {

  MinimumWidth: 600;

   VerticalAlignment: left;

  HorizontalAlignment: center

}

</style>

--------------------------------------

' A detailed example of styling 

@startuml
!includeurl https://raw.githubusercontent.com/plantuml-stdlib/Archimate-PlantUML/master/Archimate.puml
!theme archimate-standard from https://raw.githubusercontent.com/plantuml-stdlib/Archimate-PlantUML/master/themes
top to bottom direction

<style>
.a {
  MinimumWidth: 650;
  FontColor: blue;
  VerticalAlignment: left;
  HorizontalAlignment: center;
  BackGroundColor: #faf7f6;
  LineColor: #ff45ff;
  FontStyle: italic;
  LineStyle: 3;
  Padding: 0;
  Margin: 0;
}

.b {
  MinimumWidth: 600;
  
  VerticalAlignment: left;
  HorizontalAlignment: center;
  FontColor: green;
  LineColor: purple;
  LineStyle: dotted;
  margin: 0;
  padding: 0;

}


</style>

rectangle "OuterBox" as OuterBox <<a>>{


rectangle "Motivation Layer" as motivationLayer <<b>>{
 
    Motivation_Stakeholder(Stakeholder, "Project Manager")
    Motivation_Goal(Goal, "Increase Efficiency")
    Motivation_Requirement(Requirement, "Automate Task Assignments")
}

rectangle "Strategy Layer" as strategyLayer <<b>>{

    Strategy_Capability(Capability, "Task Automation")
    Strategy_Resource(Resource, "AI-based Task Engine")
}

rectangle "Business Layer" as businessLayer <<b>>{

    Business_Actor(Actor, "Employee")
    Business_Process(Process, "Task Assignment")
    Business_Service(Service, "Task Management Service")
}

rectangle "Application Layer" as applicationLayer <<b>>{

    Application_Component(AppComponent, "Task Management API")
    Application_Service(AppService, "Task Processing Service")
}

rectangle "Technology Layer" as technologyLayer <<b>> {

    Technology_Node(TechNode, "Cloud Server")
    Technology_Service(TechService, "Database Hosting")
}

}

Stakeholder -[hidden]- Capability
Capability -[hidden]- Actor
Actor -[hidden]- AppComponent
AppComponent -[hidden]- TechNode
@enduml

-------------------------
' Putting elements in a box can be done by various methods: Grouping, rectangle, Mainframe, frame

' Creating a box around everything that is below mainframe 

mainframe This is a **mainframe**

' Creating a box with brackets so that elements inside brackets display in the box
Mainframe OuterFrame {
  frame a {
  }
  frame b {
  }

Themes for Archimate in PlantUML
!theme archimate-handwriting from https://raw.githubusercontent.com/plantuml-stdlib/Archimate-PlantUML/master/themes
!theme archimate-alternate from https://raw.githubusercontent.com/plantuml-stdlib/Archimate-PlantUML/master/themes
!theme archimate-saturated from https://raw.githubusercontent.com/plantuml-stdlib/Archimate-PlantUML/master/themes
!theme archimate-lowsaturation from https://raw.githubusercontent.com/plantuml-stdlib/Archimate-PlantUML/master/themes

Comments

Popular posts from this blog

Example 1: ArchiMate relationship in PlantUML code to demonstrate 15 relationship types

 Following section presents 15 types of relationships in ArchiMate and PlantUML to generate the diagram. Since this code is generated by GEN-AI it may require precision on aspects other than PlantUML syntax: Diagram Plant UML Code:  @startuml '!includeurl https://raw.githubusercontent.com/plantuml-stdlib/Archimate-PlantUML/master/Archimate.puml ' Another way of including Archimate Library (above is commented for following) !include <archimate/Archimate> !theme archimate-standard from https://raw.githubusercontent.com/plantuml-stdlib/Archimate-PlantUML/master/themes title ArchiMate Relationships Overview <style> element{     HorizontalAlignment: left;     MinimumWidth : 180;     Padding: 25; } </style> left to right direction rectangle Other {     Business_Role(Role_SeniorManager, "Senior Manager")     Business_Role(Role_Manager, "Manager") } rectangle Dynamic {     Business_Event(Event_CustomerReques...

Examples 7: ArchiMate flow relationship between elements in layers

Diagram Code @startuml !include < archimate / Archimate > < style > element {     HorizontalAlignment : left ;     MinimumWidth : 180 ;     Padding : 20 ; } note {     BackgroundColor : #FFFFCC ;     RoundCorner : 5 ;     MaximumWidth : 250 ; } </ style > title "ArchiMate 3.2 Valid Flow Relationships" left to right direction ' Business Layer Flow Relationships rectangle "Business Layer Flows" {     Business_Process ( bp1 , "Order Process" )     Business_Process ( bp2 , "Payment Process" )     Rel_Flow ( bp1 , bp2 , "Order data" )     note on link         Flow between Business Processes     end note         Business_Function ( bf1 , "Sales Function" )     Business_Function ( bf2 , "Delivery Function" )     Rel_Flow ( bf1 , bf2 , "Sales information" )     note on link     ...

SmartSimpleTextGenerator: A Smarter Way to Generate Text

  Introduction In the world of text generation, simple n-gram models can produce decent results, but they often lack context-awareness and coherence. To address these limitations, I have developed SmartSimpleTextGenerator , an improved version of my previous project, ImprovedSimpleTextGenerator . This new version enhances the text generation process by integrating Part-of-Speech (POS) tagging , n-gram models , and a back-off strategy , making the generated text more meaningful and contextually relevant. Key Features of SmartSimpleTextGenerator ✅ N-Gram Model with POS Tagging – Uses trigrams (default n=3) and applies POS tagging for better word prediction. ✅ Back-off Strategy – If a trigram sequence is unavailable, it falls back to bigrams and unigrams to ensure smooth text generation. ✅ Sentence Tokenization & Structure Preservation – Tokenizes input text properly while maintaining sentence integrity. ✅ Randomized Word Selection – Generates diverse outputs rather ...