# joaogabrielhermida/convert-dwgtopdf architecture

> Architecture diagram of the GitHub repository joaogabrielhermida/convert-dwgtopdf, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/joaogabrielhermida/convert-dwgtopdf
- Repository: https://github.com/joaogabrielhermida/convert-dwgtopdf

## Overview

Convert-DwgToPdf is a PowerShell command-line tool that reads conversion settings and CSV job data, converts DWG drawings through DWGTrueView, and produces renamed PDFs at specified destinations. The README documents plotting by format and logging as product capabilities. The source excerpts are unavailable, so helper responsibilities and detailed call relationships cannot be verified; edges below reflect only relationships stated in the README.

Main entry points: [`Main.ps1`](https://github.com/joaogabrielhermida/convert-dwgtopdf/blob/main/Main.ps1) (Conversion runner), [`config.json`](https://github.com/joaogabrielhermida/convert-dwgtopdf/blob/main/config.json) (Runtime settings), [`Modules/DWGTrueViewScripts/plot-landscape.scr`](https://github.com/joaogabrielhermida/convert-dwgtopdf/blob/main/Modules/DWGTrueViewScripts/plot-landscape.scr) (Landscape plot), [`Modules/DWGTrueViewScripts/plot-portrait.scr`](https://github.com/joaogabrielhermida/convert-dwgtopdf/blob/main/Modules/DWGTrueViewScripts/plot-portrait.scr) (Portrait plot)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and settings"]
  node_main["Conversion runner<br/>[Main.ps1]"]
  node_config["Runtime settings<br/>[config.json]"]
end

subgraph group_conversion["Conversion workflow"]
  node_converter["DWGTrueView"]
  node_landscape["Landscape plot<br/>[plot-landscape.scr]"]
  node_portrait["Portrait plot<br/>[plot-portrait.scr]"]
end

subgraph group_helpers["Runtime helpers"]
  node_logger["Log writer"]
  node_csvreader["CSV reader"]
  node_location["Location helper"]
  node_process["Process helper"]
end

subgraph group_artifacts["Input and output"]
  node_csv["CSV job data<br/>[ExportPDF.csv]"]
  node_output["Renamed PDF output"]
  node_log["Conversion log<br/>[conversion-log.txt]"]
end

node_operator(("Operator"))

node_operator -->|"runs"| node_main
node_main -->|"uses settings"| node_config
node_main -->|"processes jobs"| node_csv
node_main -->|"converts through"| node_converter
node_main -->|"renames and moves"| node_output
node_main -->|"logs progress"| node_log
node_main -.->|"selects plot format"| node_landscape
node_main -.->|"selects plot format"| node_portrait

click node_main "https://github.com/joaogabrielhermida/convert-dwgtopdf/blob/main/Main.ps1"
click node_config "https://github.com/joaogabrielhermida/convert-dwgtopdf/blob/main/config.json"
click node_csv "https://github.com/joaogabrielhermida/convert-dwgtopdf/blob/main/input/ExportPDF.csv"
click node_landscape "https://github.com/joaogabrielhermida/convert-dwgtopdf/blob/main/Modules/DWGTrueViewScripts/plot-landscape.scr"
click node_portrait "https://github.com/joaogabrielhermida/convert-dwgtopdf/blob/main/Modules/DWGTrueViewScripts/plot-portrait.scr"
click node_logger "https://github.com/joaogabrielhermida/convert-dwgtopdf/blob/main/Modules/Helpers/Write-LogMessage.psm1"
click node_log "https://github.com/joaogabrielhermida/convert-dwgtopdf/blob/main/log/conversion-log.txt"
click node_csvreader "https://github.com/joaogabrielhermida/convert-dwgtopdf/blob/main/Modules/Helpers/Read-DataFromCSV.psm1"
click node_location "https://github.com/joaogabrielhermida/convert-dwgtopdf/blob/main/Modules/Helpers/Get-CurrentLocation.psm1"
click node_process "https://github.com/joaogabrielhermida/convert-dwgtopdf/blob/main/Modules/Helpers/Stop-ProcessByName.psm1"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_main,node_config toneBlue
class node_converter,node_landscape,node_portrait toneAmber
class node_logger,node_csvreader,node_location,node_process toneMint
class node_csv,node_output,node_log toneRose
class node_operator toneIndigo
```

## Components

### Entry and settings

- [Conversion runner](https://github.com/joaogabrielhermida/convert-dwgtopdf/blob/main/Main.ps1): `Main.ps1`
- [Runtime settings](https://github.com/joaogabrielhermida/convert-dwgtopdf/blob/main/config.json): `config.json`

### Conversion workflow

- **DWGTrueView**
- [Landscape plot](https://github.com/joaogabrielhermida/convert-dwgtopdf/blob/main/Modules/DWGTrueViewScripts/plot-landscape.scr): `Modules/DWGTrueViewScripts/plot-landscape.scr`
- [Portrait plot](https://github.com/joaogabrielhermida/convert-dwgtopdf/blob/main/Modules/DWGTrueViewScripts/plot-portrait.scr): `Modules/DWGTrueViewScripts/plot-portrait.scr`

### Runtime helpers

- [Log writer](https://github.com/joaogabrielhermida/convert-dwgtopdf/blob/main/Modules/Helpers/Write-LogMessage.psm1): `Modules/Helpers/Write-LogMessage.psm1`
- [CSV reader](https://github.com/joaogabrielhermida/convert-dwgtopdf/blob/main/Modules/Helpers/Read-DataFromCSV.psm1): `Modules/Helpers/Read-DataFromCSV.psm1`
- [Location helper](https://github.com/joaogabrielhermida/convert-dwgtopdf/blob/main/Modules/Helpers/Get-CurrentLocation.psm1): `Modules/Helpers/Get-CurrentLocation.psm1`
- [Process helper](https://github.com/joaogabrielhermida/convert-dwgtopdf/blob/main/Modules/Helpers/Stop-ProcessByName.psm1): `Modules/Helpers/Stop-ProcessByName.psm1`

### Input and output

- [CSV job data](https://github.com/joaogabrielhermida/convert-dwgtopdf/blob/main/input/ExportPDF.csv): `input/ExportPDF.csv`
- **Renamed PDF output**
- [Conversion log](https://github.com/joaogabrielhermida/convert-dwgtopdf/blob/main/log/conversion-log.txt): `log/conversion-log.txt`

### Other components

- **Operator**

## Connections

- Operator → Conversion runner: runs (evidence: `README.md`)
- Conversion runner → Runtime settings: uses settings (evidence: `README.md`)
- Conversion runner → CSV job data: processes jobs (evidence: `README.md`)
- Conversion runner → DWGTrueView: converts through (evidence: `README.md`)
- Conversion runner → Renamed PDF output: renames and moves (evidence: `README.md`)
- Conversion runner → Conversion log: logs progress (evidence: `README.md`)
- Conversion runner → Landscape plot: selects plot format
- Conversion runner → Portrait plot: selects plot format
