Adsk.Platform.ACC.FileManagement
0.1.3
dotnet add package Adsk.Platform.ACC.FileManagement --version 0.1.3
NuGet\Install-Package Adsk.Platform.ACC.FileManagement -Version 0.1.3
<PackageReference Include="Adsk.Platform.ACC.FileManagement" Version="0.1.3" />
paket add Adsk.Platform.ACC.FileManagement --version 0.1.3
#r "nuget: Adsk.Platform.ACC.FileManagement, 0.1.3"
// Install Adsk.Platform.ACC.FileManagement as a Cake Addin #addin nuget:?package=Adsk.Platform.ACC.FileManagement&version=0.1.3 // Install Adsk.Platform.ACC.FileManagement as a Cake Tool #tool nuget:?package=Adsk.Platform.ACC.FileManagement&version=0.1.3
Autodesk Construction Cloud - File Management
The package Adsk.Platform.ACC.FileManagement
provides a set of APIs to interact with the Autodesk Construction Cloud - File Management Service.
Documentation
- API Reference: Strongly typed API
- Helpers: Set of helper methods
Installation
dotnet add package Adsk.Platform.ACC.FileManagement
Usage
See the QuickStart Guide for a general understanding.
The root object is FileManagementClient
. This object provides access to the Authentication
API and the Helpers
method.
Use the API
using Autodesk.ACC.FileManagement;
using Autodesk.ACC.FileManagement.Models;
public async Task<CustomAttributeDefinitions> GetAttributeDefinitions()
{
async Task<string> getAccessToken()
{
//return access token with your logic
}
var FileClient = new FileManagementClient(getAccessToken);
var projectId = ""; // Replace with your project id like 'c0337487-5b66-422b-a284-c273b424af54'
var folderId = ""; // Replace with your folder id, like 'urn:adsk.wipprod:fs.folder:co.9g7HeA2wRqOxLlgLJ40UGQ'
// The `FileClient.Api` object refers to the base url `https://developer.api.autodesk.com/bim360/docs/v1/`
var attrDef = await FileClient.Api.Projects[projectId].Folders[folderId].CustomAttributeDefinitions.GetAsync();
return attrDef;
}
Use the Helpers
Helpers simplify the usage of the API by providing a set of methods to interact with the API. Here is an example of how to use a helper method to update a custom attribute value. This method wraps the following steps and returns a list of errors if any.
- Get the custom attribute definitions
- Check if the value can be applied
- Is attribute exists?
- Is a value valid?
- Update the attribute value
using Autodesk.ACC.FileManagement.Helpers;
using Autodesk.Authentication.Helpers.Models;
public async Task<List<AttributeUpdateError>> SetCustomAttributeValue()
{
var projectId = ""; // Replace with your project id like 'c0337487-5b66-422b-a284-c273b424af54'
var folderId= ""; // Replace with your folder id, like 'urn:adsk.wipprod:fs.folder:co.9g7HeA2wRqOxLlgLJ40UGQ'
var fileId = ""; // Replace with your file id, like 'urn:adsk.wipprod:dm.lineage:file:co.9g7HeA2wRqOxLlgLJ40UGQ'
var attributes = new List<CustomAttribute>()
{
(Name: "MyTextAttribute", Value: "NewValue"),
};
var errors = await CustomAttrClient.Helper.UpdateCustomAttributesAsync(projectId, fileId, fileId, attributes);
return errors;
}
Product | Versions 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. |
-
net8.0
- Adsk.Platform.HttpClient (>= 0.1.3)
- Microsoft.Kiota.Authentication.Azure (>= 1.13.1)
- Microsoft.Kiota.Bundle (>= 1.13.1)
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 |
---|---|---|
0.1.3 | 102 | 10/17/2024 |
0.1.2 | 86 | 10/16/2024 |
0.1.1 | 94 | 10/16/2024 |
0.1.0 | 100 | 10/16/2024 |
0.0.16 | 94 | 10/14/2024 |
0.0.15 | 87 | 10/14/2024 |
0.0.14 | 90 | 10/14/2024 |
0.0.13 | 122 | 9/18/2024 |
0.0.12 | 75 | 7/30/2024 |
0.0.11 | 87 | 7/16/2024 |
0.0.10 | 85 | 7/16/2024 |
0.0.9 | 88 | 5/31/2024 |
0.0.8 | 89 | 5/22/2024 |
0.0.7 | 76 | 5/14/2024 |
0.0.6 | 120 | 5/4/2024 |