Adsk.Platform.ACC.FileManagement 0.0.9

There is a newer version of this package available.
See the version list below for details.
dotnet add package Adsk.Platform.ACC.FileManagement --version 0.0.9                
NuGet\Install-Package Adsk.Platform.ACC.FileManagement -Version 0.0.9                
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.0.9" />                
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.0.9                
#r "nuget: Adsk.Platform.ACC.FileManagement, 0.0.9"                
#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.0.9

// Install Adsk.Platform.ACC.FileManagement as a Cake Tool
#tool nuget:?package=Adsk.Platform.ACC.FileManagement&version=0.0.9                

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 95 10/17/2024
0.1.2 81 10/16/2024
0.1.1 84 10/16/2024
0.1.0 94 10/16/2024
0.0.16 84 10/14/2024
0.0.15 79 10/14/2024
0.0.14 84 10/14/2024
0.0.13 112 9/18/2024
0.0.12 70 7/30/2024
0.0.11 80 7/16/2024
0.0.10 80 7/16/2024
0.0.9 83 5/31/2024
0.0.8 84 5/22/2024
0.0.7 69 5/14/2024
0.0.6 115 5/4/2024