![]() |
VOOZH | about |
dotnet add package Xbim.WexServer.Client --version 1.0.0
NuGet\Install-Package Xbim.WexServer.Client -Version 1.0.0
<PackageReference Include="Xbim.WexServer.Client" Version="1.0.0" />
<PackageVersion Include="Xbim.WexServer.Client" Version="1.0.0" />Directory.Packages.props
<PackageReference Include="Xbim.WexServer.Client" />Project file
paket add Xbim.WexServer.Client --version 1.0.0
#r "nuget: Xbim.WexServer.Client, 1.0.0"
#:package Xbim.WexServer.Client@1.0.0
#addin nuget:?package=Xbim.WexServer.Client&version=1.0.0Install as a Cake Addin
#tool nuget:?package=Xbim.WexServer.Client&version=1.0.0Install as a Cake Tool
👁 GitHub Packages
👁 License: MIT
A typed HTTP client for the Xbim Server API. Use this package to connect your BIM applications to Xbim Server for model storage, processing, and management. Auto-generated from OpenAPI/Swagger specifications using NSwag.
This package is required when using Xbim.WexBlazor in Platform mode (connected to Xbim Server). For standalone viewer applications without a backend, you only need Xbim.WexBlazor.
# Add GitHub Packages source (one-time setup)
dotnet nuget add source https://nuget.pkg.github.com/Ibrahim5aad/index.json --name github --username YOUR_GITHUB_USERNAME --password YOUR_GITHUB_PAT
# Install the package
dotnet add package Xbim.WexServer.Client
Note: The
YOUR_GITHUB_PATneedsread:packagesscope. Create a PAT here.
// Program.cs
builder.Services.AddWexServerClient(options =>
{
options.BaseUrl = "https://your-Xbim-server.com";
});
Implement IAuthTokenProvider for your authentication flow:
public class MyTokenProvider : IAuthTokenProvider
{
public Task<string?> GetTokenAsync(CancellationToken cancellationToken = default)
{
// Return your JWT token
return Task.FromResult<string?>("your-jwt-token");
}
}
Register with DI:
builder.Services.AddSingleton<IAuthTokenProvider, MyTokenProvider>();
builder.Services.AddWexServerClient(options =>
{
options.BaseUrl = "https://your-Xbim-server.com";
});
@inject IXbimClient Client
// List workspaces
var workspaces = await Client.WorkspacesAllAsync();
// Create a project
var project = await Client.ProjectsPOSTAsync(new CreateProjectRequest
{
Name = "My Project",
WorkspaceId = workspaceId
});
// Upload a model
using var stream = File.OpenRead("model.ifc");
var file = await Client.UploadAsync(new FileParameter(stream, "model.ifc"));
// Get element properties
var properties = await Client.PropertiesAsync(modelVersionId, elementId);
The client provides typed methods for all server endpoints:
| Method | Description |
|---|---|
WorkspacesAllAsync() |
List all workspaces |
WorkspacesPOSTAsync(request) |
Create workspace |
WorkspacesGETAsync(id) |
Get workspace by ID |
ProjectsAllAsync() |
List all projects |
ProjectsPOSTAsync(request) |
Create project |
ModelsAllAsync() |
List all models |
ModelsPOSTAsync(request) |
Create model |
VersionsAllAsync(modelId) |
List model versions |
VersionsPOSTAsync(modelId, request) |
Create version |
UploadAsync(file) |
Upload file |
PropertiesAsync(versionId, elementId) |
Get element properties |
UsageAsync(workspaceId) |
Get storage usage |
builder.Services.AddWexServerClient(options =>
{
// Required: Server base URL
options.BaseUrl = "https://api.example.com";
// Optional: Request timeout (default: 30s)
options.Timeout = TimeSpan.FromMinutes(2);
});
For scenarios without DI:
var httpClient = new HttpClient
{
BaseAddress = new Uri("https://your-server.com")
};
var client = new XbimClient(httpClient);
var workspaces = await client.WorkspacesAllAsync();
If the server API changes, regenerate the client:
# Fetch latest swagger.json from running server
dotnet msbuild -t:FetchSwagger -p:ServerUrl=http://localhost:5000
# Regenerate client code
dotnet msbuild -t:RegenerateClient
# Or combined
dotnet msbuild -t:UpdateClient -p:ServerUrl=http://localhost:5000
Newtonsoft.Json - JSON serializationMicrosoft.Extensions.Http - HttpClientFactoryMicrosoft.Extensions.Http.Resilience - Retry policiesMIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 1 NuGet packages that depend on Xbim.WexServer.Client:
| Package | Downloads |
|---|---|
|
Xbim.WexBlazor
A Blazor wrapper for the xBIM Viewer, providing seamless integration of 3D BIM model visualization in Blazor WebAssembly applications. Includes model management, toolbar system, and plugin support. |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 205 | 2/18/2026 |