VOOZH about

URL: https://www.nuget.org/packages/ricaun.Autodesk.Forge.Oss.DesignAutomation/

⇱ NuGet Gallery | ricaun.Autodesk.Forge.Oss.DesignAutomation 3.1.1




👁 Image
ricaun.Autodesk.Forge.Oss.DesignAutomation 3.1.1

Prefix Reserved
dotnet add package ricaun.Autodesk.Forge.Oss.DesignAutomation --version 3.1.1
 
 
NuGet\Install-Package ricaun.Autodesk.Forge.Oss.DesignAutomation -Version 3.1.1
 
 
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="ricaun.Autodesk.Forge.Oss.DesignAutomation" Version="3.1.1" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ricaun.Autodesk.Forge.Oss.DesignAutomation" Version="3.1.1" />
 
Directory.Packages.props
<PackageReference Include="ricaun.Autodesk.Forge.Oss.DesignAutomation" />
 
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 ricaun.Autodesk.Forge.Oss.DesignAutomation --version 3.1.1
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ricaun.Autodesk.Forge.Oss.DesignAutomation, 3.1.1"
 
 
#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 ricaun.Autodesk.Forge.Oss.DesignAutomation@3.1.1
 
 
#: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=ricaun.Autodesk.Forge.Oss.DesignAutomation&version=3.1.1
 
Install as a Cake Addin
#tool nuget:?package=ricaun.Autodesk.Forge.Oss.DesignAutomation&version=3.1.1
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Autodesk.Forge.Oss.DesignAutomation

👁 Visual Studio 2022
👁 Nuke
👁 Build
👁 .NET 6.0
👁 Nuget

PackageReference

<PackageReference Include="ricaun.Autodesk.Forge.Oss.DesignAutomation" Version="*" />

Requirements

Dependencies

Configuration

By default the Forge credentials could be defined with the following environment variables:

APS_CLIENT_ID=<your client id>
APS_CLIENT_SECRET=<your client secret>

or

FORGE_CLIENT_ID=<your client id>
FORGE_CLIENT_SECRET=<your client secret>
Region

You can define the region of the bucket. Available regions

APS_CLIENT_BUCKET_REGION=<region>

or

FORGE_CLIENT_BUCKET_REGION=<region>
Custom

You can define a custom header to be sent with each Design Automation requests to the Forge API. The custom header is only enabled if the engine is deprecated.

APS_CLIENT_CUSTOM_HEADER_VALUE=<your custom header>

or

FORGE_CLIENT_CUSTOM_HEADER_VALUE=<your custom header>

The custom header follow pattern x-my-custom-header: engine value is {0}. (The value {0} is replaced with the engine+version.) The header gonna be x-my-custom-header and the value engine value is Autodesk.Revit+2023 when using the engine Autodesk.Revit+2023.

Samples

This repository contains each sample of the Autodesk Step-by-Step Tutorial.

API Reference

The package use the namespace Autodesk.Forge.Oss.DesignAutomation.

DesignAutomationService

DesignAutomationService class contain the methods to interact with the Oss and Design Automation API. Internally uses the ParameterArgumentService to convert a class with Attributes to convert in the Activity and WorkItem to send the request to the Design Automation API.

MaxDesignAutomationService
IDesignAutomationService designAutomationService = new MaxDesignAutomationService("AppName")
{
	EngineVersions = new[] { "2021" },
};
AutoCADDesignAutomationService
IDesignAutomationService designAutomationService = new AutoCADDesignAutomationService("AppName")
{
	EngineVersions = new[] { "24" },
};
InventorDesignAutomationService
IDesignAutomationService designAutomationService = new InventorDesignAutomationService("AppName")
{
	EngineVersions = new[] { "2021" },
};
RevitDesignAutomationService
IDesignAutomationService designAutomationService = new RevitDesignAutomationService("AppName")
{
	EngineVersions = new[] { "2021" },
};

Initialize

Initialize AppBundle by creating and uploading the zip file to the Design Automation.

await designAutomationService.Initialize("Path/AppBundle.zip");

Run

Create the Activity and run the WorkItem and wait for the result, use the Parameters class to define the parameters of the Activity and WorkItem.

bool result = await designAutomationService.Run<Parameters>();
bool result = await designAutomationService.Run<Parameters>((parameters) => {});
Parameters parameters;
bool result = await designAutomationService.Run<Parameters>(parameters);

Delete

Delete all the resources created by the Initialize and Run. AppBundle and Activity gonna be deleted if exists.

await designAutomationService.Delete();

Parameters

The Parameters class is used to define the parameters of the Activity and WorkItem using the Attributes.

  • ParameterInputAttribute - Define the input parameter of the Activity and WorkItem.
  • ParameterOutputAttribute - Define the output parameter of the Activity and WorkItem.

ParameterInputAttribute

Base class ParameterActivityAttribute is used to update the Activity before send the request to the Design Automation API.

  • ParameterActivityClearBundleAttribute - Clear the AppBundle before update the Activity.
  • ParameterActivityInputArgumentAttribute - Define the input argument of the Activity.
  • ParameterActivityInputAttribute - Define the input parameter of the Activity.
  • ParameterActivityInputOpenAttribute - Define the input parameter of the Activity with Open file.
  • ParameterActivityLanguageAttribute - Define the language of the Activity.
  • ParameterActivityScriptAttribute - Define the script of the Activity.

ParameterWorkItemAttribute

Base class ParameterWorkItemAttribute is used to update the WorkItem before send the request to the Design Automation API.

  • ParameterWorkItemTimeSecAttribute - Define the timeout of the WorkItem.
  • ParameterWorkItemStringAttribute - Define the string input in the WorkItem.
  • ParameterWorkItemXrefTreeAttribute - Define the XrefTree input in the WorkItem.
  • ParameterWorkItem3LeggedTokenAttribute - Define the adsk3LeggedToken token input in the WorkItem. (token is masked in the log.)

License

This project is under the MIT License.


Do you like this project? Please star this project on GitHub!

Product Versions Compatible and additional computed target framework versions.
.NET net6.0 net6.0 is compatible.  net6.0-android net6.0-android was computed.  net6.0-ios net6.0-ios was computed.  net6.0-maccatalyst net6.0-maccatalyst was computed.  net6.0-macos net6.0-macos was computed.  net6.0-tvos net6.0-tvos was computed.  net6.0-windows net6.0-windows was computed.  net7.0 net7.0 was computed.  net7.0-android net7.0-android was computed.  net7.0-ios net7.0-ios was computed.  net7.0-maccatalyst net7.0-maccatalyst was computed.  net7.0-macos net7.0-macos was computed.  net7.0-tvos net7.0-tvos was computed.  net7.0-windows net7.0-windows was computed.  net8.0 net8.0 is compatible.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 was computed.  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. 
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
3.1.1 312 2/21/2025
3.1.0 248 1/24/2025
3.0.0 272 12/18/2024
2.1.0 241 12/13/2024
2.0.0 342 8/20/2024
1.0.8 459 12/7/2023 1.0.8 is deprecated because it has critical bugs.
Loading failed