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                
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="Adsk.Platform.ACC.FileManagement" Version="0.1.3" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Adsk.Platform.ACC.FileManagement --version 0.1.3                
#r "nuget: Adsk.Platform.ACC.FileManagement, 0.1.3"                
#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.
// 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

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.

  1. Get the custom attribute definitions
  2. Check if the value can be applied
    • Is attribute exists?
    • Is a value valid?
  3. 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 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. 
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
0.1.3 100 10/17/2024
0.1.2 86 10/16/2024
0.1.1 93 10/16/2024
0.1.0 99 10/16/2024
0.0.16 91 10/14/2024
0.0.15 86 10/14/2024
0.0.14 89 10/14/2024
0.0.13 117 9/18/2024
0.0.12 73 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