# mefistotelis/pylabview architecture

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

- Interactive diagram: https://gitdiagram.com/mefistotelis/pylabview
- Repository: https://github.com/mefistotelis/pylabview

## Overview

pylabview is a LabVIEW RSRC toolkit for extracting VI/CTL resources into editable XML and block files, then rebuilding RSRC files while preserving binary fidelity where supported. The main workflow runs from the readRSRC command-line entry point through resource-container and block parsing, with specialized modules interpreting types, data, heaps and links; modRSRC supports XML-based modifications and repairs before reconstruction. README capabilities also include compiled-code extraction, front-panel recovery and batch processing. Some internals are unsampled, so edges reflect only indexed references or documented workflow.

Main entry points: [`pylabview/LVblock.py`](https://github.com/mefistotelis/pylabview/blob/master/pylabview/LVblock.py) (Resource blocks), [`pylabview/LVdatatype.py`](https://github.com/mefistotelis/pylabview/blob/master/pylabview/LVdatatype.py) (Type descriptors), [`pylabview/LVdatafill.py`](https://github.com/mefistotelis/pylabview/blob/master/pylabview/LVdatafill.py) (Typed data fills), [`pylabview/LVxml.py`](https://github.com/mefistotelis/pylabview/blob/master/pylabview/LVxml.py) (XML support)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User workflow"]
  node_extract["Extract command<br/>[readRSRC.py]"]
  node_rebuild["Rebuild command<br/>[readRSRC.py]"]
end

subgraph group_resource["RSRC parsing"]
  node_rsrc["Resource container<br/>[LVrsrcontainer.py]"]
  node_blocks["Resource blocks<br/>[LVblock.py]"]
  node_misc["Format utilities<br/>[LVmisc.py]"]
end

subgraph group_model["VI data model"]
  node_parts["Panel parts<br/>[LVparts.py]"]
  node_instrument["Instrument metadata<br/>[LVinstrument.py]"]
  node_types["Type descriptors<br/>[LVdatatype.py]"]
  node_type_refs["Type references<br/>[LVdatatyperef.py]"]
  node_fills["Typed data fills<br/>[LVdatafill.py]"]
  node_classes["Shared LV objects<br/>[LVclasses.py]"]
  node_heap["Panel and diagram heaps<br/>[LVheap.py]"]
  node_links["Link references<br/>[LVlinkinfo.py]"]
  node_code["Compiled code<br/>[LVcode.py]"]
end

subgraph group_editing["XML modification"]
  node_mod["XML modifier<br/>[modRSRC.py]"]
  node_xml["XML support<br/>[LVxml.py]"]
end

node_user(("Tool user"))

node_user -->|"runs extraction"| node_extract
node_extract -->|"opens RSRC"| node_rsrc
node_rsrc -->|"loads blocks"| node_blocks
node_blocks -->|"uses types"| node_types
node_blocks -->|"uses fills"| node_fills
node_blocks -->|"uses heaps"| node_heap
node_blocks -->|"uses links"| node_links
node_blocks -->|"uses code"| node_code
node_blocks -->|"uses metadata"| node_instrument
node_blocks -->|"uses definitions"| node_parts
node_types -->|"uses references"| node_type_refs
node_types -->|"uses objects"| node_classes
node_fills -->|"uses descriptors"| node_types
node_fills -->|"uses variants"| node_classes
node_heap -->|"decodes values"| node_types
node_heap -->|"uses fills"| node_fills
node_blocks -->|"exports XML"| node_xml
node_user -->|"edits extracted data"| node_mod
node_mod -->|"reads and writes"| node_xml
node_mod -->|"modifies panel parts"| node_parts
node_mod -->|"prepares rebuild"| node_rebuild
node_user -->|"runs reconstruction"| node_rebuild
node_rebuild -->|"recreates RSRC"| node_rsrc
node_blocks -->|"uses utilities"| node_misc
node_types -->|"serializes types"| node_xml
node_fills -->|"serializes fills"| node_xml
node_heap -->|"serializes heaps"| node_xml

click node_extract "https://github.com/mefistotelis/pylabview/blob/master/pylabview/readRSRC.py"
click node_rebuild "https://github.com/mefistotelis/pylabview/blob/master/pylabview/readRSRC.py"
click node_rsrc "https://github.com/mefistotelis/pylabview/blob/master/pylabview/LVrsrcontainer.py"
click node_blocks "https://github.com/mefistotelis/pylabview/blob/master/pylabview/LVblock.py"
click node_mod "https://github.com/mefistotelis/pylabview/blob/master/pylabview/modRSRC.py"
click node_xml "https://github.com/mefistotelis/pylabview/blob/master/pylabview/LVxml.py"
click node_parts "https://github.com/mefistotelis/pylabview/blob/master/pylabview/LVparts.py"
click node_instrument "https://github.com/mefistotelis/pylabview/blob/master/pylabview/LVinstrument.py"
click node_types "https://github.com/mefistotelis/pylabview/blob/master/pylabview/LVdatatype.py"
click node_type_refs "https://github.com/mefistotelis/pylabview/blob/master/pylabview/LVdatatyperef.py"
click node_fills "https://github.com/mefistotelis/pylabview/blob/master/pylabview/LVdatafill.py"
click node_classes "https://github.com/mefistotelis/pylabview/blob/master/pylabview/LVclasses.py"
click node_heap "https://github.com/mefistotelis/pylabview/blob/master/pylabview/LVheap.py"
click node_links "https://github.com/mefistotelis/pylabview/blob/master/pylabview/LVlinkinfo.py"
click node_code "https://github.com/mefistotelis/pylabview/blob/master/pylabview/LVcode.py"
click node_misc "https://github.com/mefistotelis/pylabview/blob/master/pylabview/LVmisc.py"

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_extract,node_rebuild,node_user toneBlue
class node_rsrc,node_blocks,node_misc toneAmber
class node_parts,node_instrument,node_types,node_type_refs,node_fills,node_classes,node_heap,node_links,node_code toneMint
class node_mod,node_xml toneRose
```

## Components

### User workflow

- [Extract command](https://github.com/mefistotelis/pylabview/blob/master/pylabview/readRSRC.py): `pylabview/readRSRC.py`
- [Rebuild command](https://github.com/mefistotelis/pylabview/blob/master/pylabview/readRSRC.py): `pylabview/readRSRC.py`

### RSRC parsing

- [Resource container](https://github.com/mefistotelis/pylabview/blob/master/pylabview/LVrsrcontainer.py): `pylabview/LVrsrcontainer.py`
- [Resource blocks](https://github.com/mefistotelis/pylabview/blob/master/pylabview/LVblock.py): `pylabview/LVblock.py`
- [Format utilities](https://github.com/mefistotelis/pylabview/blob/master/pylabview/LVmisc.py): `pylabview/LVmisc.py`

### VI data model

- [Panel parts](https://github.com/mefistotelis/pylabview/blob/master/pylabview/LVparts.py): `pylabview/LVparts.py`
- [Instrument metadata](https://github.com/mefistotelis/pylabview/blob/master/pylabview/LVinstrument.py): `pylabview/LVinstrument.py`
- [Type descriptors](https://github.com/mefistotelis/pylabview/blob/master/pylabview/LVdatatype.py): `pylabview/LVdatatype.py`
- [Type references](https://github.com/mefistotelis/pylabview/blob/master/pylabview/LVdatatyperef.py): `pylabview/LVdatatyperef.py`
- [Typed data fills](https://github.com/mefistotelis/pylabview/blob/master/pylabview/LVdatafill.py): `pylabview/LVdatafill.py`
- [Shared LV objects](https://github.com/mefistotelis/pylabview/blob/master/pylabview/LVclasses.py): `pylabview/LVclasses.py`
- [Panel and diagram heaps](https://github.com/mefistotelis/pylabview/blob/master/pylabview/LVheap.py): `pylabview/LVheap.py`
- [Link references](https://github.com/mefistotelis/pylabview/blob/master/pylabview/LVlinkinfo.py): `pylabview/LVlinkinfo.py`
- [Compiled code](https://github.com/mefistotelis/pylabview/blob/master/pylabview/LVcode.py): `pylabview/LVcode.py`

### XML modification

- [XML modifier](https://github.com/mefistotelis/pylabview/blob/master/pylabview/modRSRC.py): `pylabview/modRSRC.py`
- [XML support](https://github.com/mefistotelis/pylabview/blob/master/pylabview/LVxml.py): `pylabview/LVxml.py`

### Other components

- **Tool user**

## Connections

- Tool user → Extract command: runs extraction (evidence: `README.md`)
- Extract command → Resource container: opens RSRC (evidence: `pylabview/readRSRC.py`)
- Resource container → Resource blocks: loads blocks (evidence: `pylabview/LVrsrcontainer.py`)
- Resource blocks → Type descriptors: uses types (evidence: `pylabview/LVblock.py`)
- Resource blocks → Typed data fills: uses fills (evidence: `pylabview/LVblock.py`)
- Resource blocks → Panel and diagram heaps: uses heaps (evidence: `pylabview/LVblock.py`)
- Resource blocks → Link references: uses links (evidence: `pylabview/LVblock.py`)
- Resource blocks → Compiled code: uses code (evidence: `pylabview/LVblock.py`)
- Resource blocks → Instrument metadata: uses metadata (evidence: `pylabview/LVblock.py`)
- Resource blocks → Panel parts: uses definitions (evidence: `pylabview/LVblock.py`)
- Type descriptors → Type references: uses references (evidence: `pylabview/LVdatatype.py`)
- Type descriptors → Shared LV objects: uses objects (evidence: `pylabview/LVdatatype.py`)
- Typed data fills → Type descriptors: uses descriptors (evidence: `pylabview/LVdatafill.py`)
- Typed data fills → Shared LV objects: uses variants (evidence: `pylabview/LVdatafill.py`)
- Panel and diagram heaps → Type descriptors: decodes values (evidence: `pylabview/LVheap.py`)
- Panel and diagram heaps → Typed data fills: uses fills (evidence: `pylabview/LVheap.py`)
- Resource blocks → XML support: exports XML (evidence: `README.md`)
- Tool user → XML modifier: edits extracted data (evidence: `README.md`)
- XML modifier → XML support: reads and writes (evidence: `pylabview/modRSRC.py`)
- XML modifier → Panel parts: modifies panel parts (evidence: `pylabview/modRSRC.py`)
- XML modifier → Rebuild command: prepares rebuild (evidence: `README.md`)
- Tool user → Rebuild command: runs reconstruction (evidence: `README.md`)
- Rebuild command → Resource container: recreates RSRC (evidence: `README.md`)
- Resource blocks → Format utilities: uses utilities (evidence: `pylabview/LVblock.py`)
- Type descriptors → XML support: serializes types (evidence: `pylabview/LVdatatype.py`)
- Typed data fills → XML support: serializes fills (evidence: `pylabview/LVdatafill.py`)
- Panel and diagram heaps → XML support: serializes heaps (evidence: `pylabview/LVheap.py`)
