# ni/vbai-dotnet architecture

> Architecture diagram of the GitHub repository ni/vbai-dotnet, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ni/vbai-dotnet
- Repository: https://github.com/ni/vbai-dotnet

## Overview

##### Main Components

a) Core API Layer
- Main VBAI wrapper components from the 'src' folder:
- VBAI.cs (main API interface)
- VBAIEnums.cs (enumerations)
- VBAIStructures.cs (data structures)
- VBAIException.cs (error handling)

b) Dependencies Layer
- External dependencies:
- Vision Builder AI (2018 or later)
- NationalInstruments.Vision.Common.dll
- .NET Framework 4.5

c) Consumer Applications Layer
- Example applications (represented by the 'examples' folder)
- Third-party applications using the API

d) Testing Infrastructure
- XUnit testing framework
- VBAITestLibrary

**[Consumer Applications Layer]**
- ↑
**[VBAI .NET API Layer]**
- ↑
**[Dependencies Layer]**

##### Connection Types

- Double lines: Data flow

##### Specific Details

a) Core API Layer Details:
- Relationship between VBAI.cs and its supporting classes
- Public interfaces exposed to consumers
- Error handling flow through VBAIException

b) Dependencies:
- Version requirements (.NET 4.5)
- Vision Builder AI dependency
- External library dependencies

c) Testing Layer:
- XUnit test infrastructure
- Test coverage paths

##### Notes Section

A notes section indicating:
- Deprecated features
- System requirements
- Build prerequisites
- Important version constraints

Remember to include build paths and deployment artifacts as these are crucial for implementation:
- src/bin/x86/Release
- src/bin/x86/Debug

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "Consumer Applications"
        ConsumerApps["Third-party Applications"]
        ExampleApp["Example Application"]:::example
        ExampleForm["Example Form"]:::example
    end

    subgraph "Core API Layer"
        VBAI["VBAI.cs<br/>(Main API Interface)"]:::core
        VBAIEnums["VBAIEnums.cs<br/>(Enumerations)"]:::core
        VBAIStructures["VBAIStructures.cs<br/>(Data Structures)"]:::core
        VBAIException["VBAIException.cs<br/>(Error Handling)"]:::core
        ProjectConfig["Project Configuration"]:::config
    end

    subgraph "Testing Infrastructure"
        XUnit["XUnit Framework"]:::test
        TestLib["VBAI Test Library"]:::test
        TestProject["Test Project"]:::test
    end

    subgraph "Dependencies Layer"
        VBAI2018["Vision Builder AI<br/>(2018 or later)"]:::dep
        NIVision["NationalInstruments<br/>Vision.Common.dll"]:::dep
        NET45[".NET Framework 4.5"]:::dep
    end

    %% Relationships
    ConsumerApps --> VBAI
    ExampleApp --> VBAI
    ExampleForm --> VBAI

    VBAI --> VBAIEnums
    VBAI --> VBAIStructures
    VBAI --> VBAIException
    VBAI --> VBAI2018
    VBAI --> NIVision
    VBAI --> NET45

    TestLib --> VBAI
    TestProject --> TestLib
    XUnit --> TestLib

    %% Styles
    classDef core fill:#a8d1f0,stroke:#333,stroke-width:2px
    classDef dep fill:#90EE90,stroke:#333,stroke-width:2px
    classDef example fill:#FFB366,stroke:#333,stroke-width:2px
    classDef test fill:#DDA0DD,stroke:#333,stroke-width:2px
    classDef config fill:#E6E6FA,stroke:#333,stroke-width:2px

    %% Click Events
    click VBAI "https://github.com/ni/vbai-dotnet/blob/master/src/VBAI.cs"
    click VBAIEnums "https://github.com/ni/vbai-dotnet/blob/master/src/VBAIEnums.cs"
    click VBAIStructures "https://github.com/ni/vbai-dotnet/blob/master/src/VBAIStructures.cs"
    click VBAIException "https://github.com/ni/vbai-dotnet/blob/master/src/VBAIException.cs"
    click TestLib "https://github.com/ni/vbai-dotnet/blob/master/tests/VBAITestLibrary/VBAITests.cs"
    click TestProject "https://github.com/ni/vbai-dotnet/blob/master/tests/VBAITestLibrary/VBAITestLibrary.csproj"
    click XUnit "https://github.com/ni/vbai-dotnet/blob/master/tests/packages/xunit.2.0.0"
    click ExampleApp "https://github.com/ni/vbai-dotnet/blob/master/examples/Program.cs"
    click ExampleForm "https://github.com/ni/vbai-dotnet/blob/master/examples/Form1.cs"
    click ProjectConfig "https://github.com/ni/vbai-dotnet/blob/master/src/VBAI.csproj"

    %% Legend
    subgraph Legend
        L1["Core API Component"]:::core
        L2["External Dependency"]:::dep
        L3["Example Application"]:::example
        L4["Testing Component"]:::test
        L5["Configuration"]:::config
    end
```
