How coolorangelabs/powerloadpublic works
Project Type and Purpose
• This is a PowerShell extension (a PowerShell module) named powerLoad.
• Purpose: automate data-loading workflows into Autodesk Vault using the DTU/BCP toolkit, with an intermediate SQL Server “powerLoad” database for high-speed manipulation, validation, and packaging into BCP files.
Main Components
a. PowerShell Client Layer
• PowerShell console or script (.ps1) that imports powerload.dll and invokes CmdLets.
• Sample scripts live under Samples/.
b. Business Logic Layer (CmdLets Module)
• powerload.dll exposes CmdLets (Connect-PowerLoadDatabase, Import-BCP, Import-FilesToDatabase, Resolve-AutoCadReferences, Resolve-InventorReferences, Test-PowerLoadDatabase, Test-PowerLoadVaultBehaviors, Export-BCP, plus UDP management).
• Underlying .NET code orchestrates ETL, SQL operations, Vault API calls, and BCP toolkit calls.
c. Data Layer
• powerLoad Database on MS SQL Server 2017+ – a temporary relational store for imported Vault data, file metadata, user-defined properties, reference-resolution results.
d. External Systems
• Autodesk Vault Server: target system for final DTU/BCP packages and for validation via Vault behaviors.
• BCP Toolkit (coolOrange powerLoad/bcpToolkit): external library/CLI used to import/export BCP packages.
• File System: source files for import, Inventor project files for reference resolution, output directory for BCP packages and error CSVs.
• AutoCAD/Inventor processes: external executables/libraries invoked by Resolve-AutoCadReferences and Resolve-InventorReferences to check file references.
Relationships and Data Flows
• CmdLets communicate with SQL Server to create/alter/read temp tables.
• When importing Vault data: CmdLet → Vault API → retrieves data → writes to SQL Server.
• When importing files: CmdLet → reads file system → writes metadata/blobs to SQL Server.
• Reference checks: CmdLet → AutoCAD/Inventor APIs → results back into SQL Server or CSV.
• Validation: CmdLet → queries target Vault (Vault behaviors) → errors to CSV.
• Export: CmdLet → BCP toolkit → reads SQL Server → generates DTU/BCP packages to file system.
Architectural Patterns and Design Principles
• Layered Architecture: CLI layer, business logic (.NET CmdLets), data persistence (SQL), external integration.
• ETL Pattern: Extract (Vault, file system), Transform (SQL operations, reference resolution), Load (BCP package).
• Modular: each CmdLet focuses on a single responsibility (connect, import, validate, export).
• Extensibility: new CmdLets can be added.
• Error handling via standardized CSV exports for each step.