SVF.PropDbReader 1.1.0.5

dotnet add package SVF.PropDbReader --version 1.1.0.5
                    
NuGet\Install-Package SVF.PropDbReader -Version 1.1.0.5
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SVF.PropDbReader" Version="1.1.0.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SVF.PropDbReader" Version="1.1.0.5" />
                    
Directory.Packages.props
<PackageReference Include="SVF.PropDbReader" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SVF.PropDbReader --version 1.1.0.5
                    
#r "nuget: SVF.PropDbReader, 1.1.0.5"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SVF.PropDbReader@1.1.0.5
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SVF.PropDbReader&version=1.1.0.5
                    
Install as a Cake Addin
#tool nuget:?package=SVF.PropDbReader&version=1.1.0.5
                    
Install as a Cake Tool

SVF-PropDbReader

<p align="center"> <img src="Resources/Logo.png" alt="SVF-PropDbReader Logo" width="90%"/> </p>

NuGet Version NuGet Downloads .NET 10.0 | 9.0 | 8.0 License Build & Test


Overview

SVF-PropDbReader is a .NET library (targeting .NET 10.0, 9.0, and 8.0) for reading and extracting property database (PropDb) information from SVF files. SVF is the format used by Autodesk Platform Services (APS) to stream 3D models in web applications.

The PropDb is a SQLite database (.sdb file) embedded in every translated SVF model — it contains all metadata and properties for every element in the model.

This library enables you to:

  • Read properties from a local .sdb file or download them directly from APS
  • Extract element locations (translation + bounding box) without downloading full geometry (~100x smaller)
  • Embed locations into the .sdb file for instant access (no re-download)
  • Discover all categories and property names in a model
  • Query, filter, and stream property values efficiently across large models
  • Merge inherited properties from parent elements
  • Execute custom parameterized SQL against the property database

Quick Start

Installation

dotnet add package SVF.PropDbReader

From a Local .sdb File

using SVF.PropDbReader;

using var reader = new PropDbReader(@"C:\path\to\properties.sdb");
var props = await reader.GetPropertiesForDbIdAsync(1);

foreach (var kvp in props)
    Console.WriteLine($"{kvp.Key}: {kvp.Value}");
using SVF.PropDbReader;

using var reader = await PropDbReader.CreateAsync("<ACCESS_TOKEN>", "<MODEL_URN>");
var props = await reader.GetPropertiesForDbIdAsync(1);

Streaming Large Models

// Memory-efficient — one row at a time
await foreach (var (dbId, value) in reader.GetAllPropertyValuesStreamAsync("Dimensions", "Area"))
{
    Console.WriteLine($"dbId {dbId}: Area = {value}");
}

Element Locations (Fragment Data)

New in v1.1.0: Access 3D location data (translation + bounding box) for each element without downloading full fragment geometry. All location data is stored on disk in the SQLite database — zero memory overhead.

Traditional approach downloads 100+ MB of fragment data:

// ❌ Old way: downloads all geometry, materials, transforms (~100+ MB)
var fragments = await APSToolkit.Derivatives.ReadFragmentsRemoteAsync(token, urn);
foreach (var frag in fragments)
{
    var pos = frag.Transform.Translation; // Only need these 3 values
}

PropDbReader extracts only location data and embeds it directly into the .sdb database:

// ✅ New way: downloads locations and embeds into .sdb (disk-based, no memory overhead)
using var reader = await PropDbReader.CreateWithEmbeddedLocationsAsync(token, urn);

// Query properties + locations together (reads from SQLite on disk)
var result = await reader.GetPropertiesWithLocationAsync(dbId);
Console.WriteLine($"Element at ({result.Location?.X}, {result.Location?.Y}, {result.Location?.Z})");
One-Time Download, Permanent Storage
// First run: download and embed into .sdb file
using var reader = await PropDbReader.CreateWithEmbeddedLocationsAsync(token, urn);

// Subsequent opens — locations are already in the .sdb file, no re-download
using var cachedReader = new PropDbReader("path-to-file.sdb");
if (cachedReader.HasFragmentLocations)
{
    var loc = await cachedReader.GetEmbeddedFragmentLocationAsync(dbId);
    Console.WriteLine($"Position: {loc?.X}, {loc?.Y}, {loc?.Z}");
}
Combined Property + Location Queries
// Find elements by property with locations (all from disk)
var results = await reader.FindByPropertyWithLocationsAsync("__category__", "");
foreach (var (dbId, propValue, location) in results)
{
    Console.WriteLine($"dbId {dbId}: value={propValue}, Z={location.Z}");
}

// Stream all elements with properties + locations (memory-efficient)
await foreach (var (dbId, props, loc) in reader.GetAllPropertiesWithLocationsStreamAsync())
{
    Console.WriteLine($"dbId {dbId} at ({loc.X}, {loc.Y}, {loc.Z})");
}

// Batch query with locations
var batch = await reader.GetPropertiesWithLocationsBatchAsync(new[] { 1, 2, 3 });

Cancellation Support

using var cts = new CancellationTokenSource(TimeSpan.FromSeconds(30));
var props = await reader.GetPropertiesForDbIdAsync(1, cts.Token);

Documentation

Document Description
Getting Started Installation, setup, and quick start examples
API Reference Full method signatures, parameters, and usage
Architecture Class diagrams, EAV schema, data flow, thread-safety design
Migration Guide Upgrading from v1.0.x to v1.1.0
Examples Notebook Interactive .NET Jupyter notebook with all examples

Dependencies

Package Version Purpose
Microsoft.Data.Sqlite 10.0.3 SQLite database access
Autodesk.ModelDerivative 2.2.0 APS Model Derivative API client
Autodesk.Authentication 2.0.1 APS Authentication SDK
RestSharp 112.1.0 HTTP client for fragment downloads
SharpZipLib 1.4.2 GZIP decompression for SVF resources
Newtonsoft.Json 13.0.3 JSON serialization

Contributing

  1. Fork the repository
  2. Create a branch for your feature: git checkout -b feature/my-new-method
  3. Implement your changes with XML doc comments
  4. Test: dotnet test
  5. Submit a pull request

Reporting Issues

Open an issue at GitHub Issues with your .NET version, package version, and steps to reproduce.


License

This project is licensed under the Apache License 2.0. See LICENSE for details.


References

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.0.5 95 2/16/2026
1.1.0.3 99 2/11/2026
1.1.0.2 104 2/11/2026
1.1.0.1 84 2/11/2026
1.0.9.2 84 2/11/2026
1.0.9.1 281 5/20/2025
1.0.9 211 5/20/2025
1.0.8 195 5/19/2025
1.0.6 218 5/19/2025
1.0.5 199 5/19/2025
1.0.4 258 5/16/2025