Skip to content

Commit

Permalink
Design automation/authentication update (#4)
Browse files Browse the repository at this point in the history
* Updated new collection

* ENvoronment Variables > Collection Variables

* Deleted redundant line

* Renamed last step

* Updated main images

* Updated images for task1 and 2

* Updated task

* Updated task3

* Updated Task 4

* Updated Task 5

* Updated task 6

* Updated Task 7

* Made sub topics sentence case

* Updated inventor collections

* Updated Inventor Tutorial

* Updated Inventor Tutorial

* Updated APS Portal to Postman images

* Updated images

* Updated Revit Tutorial

* renamed images

* Partial upload of new screenshots

* Minor deletion of images

* Partial upload of new images

* partial upload of new screen captures

* Added missing images

* Updated main image

* Update task-4.md

Environment Variables -> Collection Variables

* Update before_you_begin.md

Added zip file instructions

* Update before_you_begin.md

Synced Revit with Inventor

* Fixed issue with nav buttons

* Added Nav b uttons

* Fixed issue with nav buttons

* Fixed issue with Tutorial naming

* Fixed issue with tutorial name

* Fixed issue with supported Inventor Versions

* Fixed issue with Authentication version support

* Update supported versions

* Updated supported Postman info

* Updated supported versions

* Updated Model Derivative badges

* Fixed Tutorial name issue

* Updated 3dsMax tutorial instructions

* Updated all screen captures

* Replaced missing image

* Updated images

* Updated collections

* Updated collections

* Added images

* Fixed bugs

---------

Co-authored-by: Jayanath Perera <[email protected]>
  • Loading branch information
JayanathP and Jayanath-ADSK authored Oct 6, 2023
1 parent 34b1fce commit 9b8e6c0
Show file tree
Hide file tree
Showing 181 changed files with 2,317 additions and 1,323 deletions.
Binary file added DA43dsMax/collections/3dsmax_collections.zip
Binary file not shown.
703 changes: 558 additions & 145 deletions DA43dsMax/collections/DA43dsMax Tutorial.postman_collection.json

Large diffs are not rendered by default.

36 changes: 3 additions & 33 deletions DA43dsMax/collections/DA43dsMax Tutorial.postman_environment.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "36febf39-3c6a-4340-8982-2c6be4ed2d5b",
"id": "d335021d-4bca-4bb4-9a04-a8e9f3c12fbc",
"name": "DA43dsMax Tutorial",
"values": [
{
Expand All @@ -12,11 +12,6 @@
"value": "",
"enabled": true
},
{
"key": "dasApiToken",
"value": "",
"enabled": true
},
{
"key": "dasNickName",
"value": "",
Expand All @@ -32,43 +27,18 @@
"value": "",
"enabled": true
},
{
"key": "ossScriptFileObjectKey",
"value": "",
"enabled": true
},
{
"key": "ossZipFileSignedUrl",
"value": "",
"enabled": true
},
{
"key": "ossScriptFileSignedUrl",
"value": "",
"enabled": true
},
{
"key": "ossOutputFileObjectKey",
"value": "",
"enabled": true
},
{
"key": "ossOutputFileSignedUrl",
"value": "",
"enabled": true
},
{
"key": "ossScriptFileObjectKey",
"value": "",
"enabled": true
},
{
"key": "dasWorkItemId",
"value": "",
"enabled": true
}
],
"_postman_variable_scope": "environment",
"_postman_exported_at": "2019-09-27T08:33:44.149Z",
"_postman_exported_using": "Postman/7.6.0"
"_postman_exported_at": "2023-10-06T07:37:49.956Z",
"_postman_exported_using": "Postman/10.18.2"
}
Binary file modified DA43dsMax/images/aps_portal_menu_2_postman_menu_01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DA43dsMax/images/aps_portal_menu_2_postman_menu_02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DA43dsMax/images/postman_environment_dropdown.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DA43dsMax/images/task1-authenticate_successfull.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DA43dsMax/images/task1-environment_quick_look_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DA43dsMax/images/task1-envoronment_edit_variable.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DA43dsMax/images/task1-preview_environment_variables.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DA43dsMax/images/task2-delete_forge_app.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DA43dsMax/images/task2-environment_variables_grid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DA43dsMax/images/task2-successfull.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DA43dsMax/images/task3-activity_alias_create_success.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DA43dsMax/images/task3-activity_create_success.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DA43dsMax/images/task3-create_activity.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added DA43dsMax/images/task4-completed_upload.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed DA43dsMax/images/task4-guid.png
Binary file not shown.
Binary file modified DA43dsMax/images/task4-select_files_button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed DA43dsMax/images/task4-signed_downloadurl.png
Binary file not shown.
Binary file removed DA43dsMax/images/task4-signed_uploadurl.png
Binary file not shown.
Binary file modified DA43dsMax/images/task4-successful_upload.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DA43dsMax/images/task4-sucessfull_bucket_creation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DA43dsMax/images/task5-result_url.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DA43dsMax/images/task5-workitem_json_payload.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DA43dsMax/images/task6-check_status.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DA43dsMax/images/task6-download_step_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DA43dsMax/images/task6-download_step_2.png
Binary file modified DA43dsMax/images/task6-final_status.png
Binary file added DA43dsMax/images/task7-download_url.png
33 changes: 10 additions & 23 deletions DA43dsMax/instructions/before_you_begin.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,23 @@
# Before you begin...

## 1. Import the Postman Environment for the tutorial
## Import the Postman Collection and Postman environment.

Postman *environments* are named configurations that implement environment variables to store values you typically use across many HTTP requests. For example, you can save the Access Token to use for all HTTP requests, in a variable named `dasApiToken`.
Postman Collections are groups of prepopulated HTTP requests. They can also contain scripts that are executed when you send an HTTP request, and/or recieve a response.

To import the environment you need for this tutorial:
Postman environments are named configurations that implement environment variables to store values you typically use across many HTTP requests. For example, this Postman Collection stores the Access Token, which is used across most HTTP requests, in a variable named `dasApiToken`.

1. Download the file *DA43dsMax Tutorial.postman_environment.json* from the [*collections* folder of this repository](../collections).
To import the Postman Collection and environment you need for this tutorial:

2. Import *DA43dsMax Tutorial.postman_environment.json*:
1. Download the following zip file from the [*collections* folder](../collections) and expand it on your local machine.

1. In the Postman header bar, click **Import**. A dialog displays.
- _3dsmax_collections.zip_

2. Drag the file you downloaded in Step 1 to the area marked **Drop files here**. Alternatively, you can click **Choose Files** and find the file you downloaded in Step 1.
2. In the Postman header bar, click **Import**. A dialog displays.

3. Click the environment drop-down on the upper-right, and select **DA43dsMax Tutorial**. The DA43dsMax Tutorial environment loads.
3. Drag the file you expanded in step 1 to the area marked **Drop files here**. Alternatively, you can click **Choose Files** and pick the files you downloaded in step 1.

![Postman Environment drop-down](../images/postman_environment_dropdown.png "Postman Environment drop-down")

## 2. Import the Postman Collection for the tutorial.

Postman *Collections* are groups of prepopulated HTTP requests.

To import the requests you need for this tutorial:

1. Download the file *DA43dsMax Tutorial.postman_collection.json* from the [*collections* folder of this repository](../collections).

2. Import *DA43dsMax Tutorial.postman_collection.json*:

1. In the Postman header bar, click **Import**. A dialog displays.

2. Drag the file you downloaded in Step 1 to the area marked **Drop files here**. Alternatively, you can click **Choose Files** and find the file you downloaded in Step 1.
4. Click the environment drop-down on the upper-right, and select **DA43dsMax Tutorial**. The environment containing the variables for the tutorial loads.

![Postman Environment drop-down](../images/postman_environment_dropdown.png "Postman Environment drop-down")

[:rewind:](../readme.md "readme.md") [:arrow_forward:](task-1.md "Next task")
18 changes: 9 additions & 9 deletions DA43dsMax/instructions/task-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

## Create an App

1. Follow the instructions on the tutorial [Create an App](https://aps.autodesk.com/en/docs/oauth/v1/tutorials/create-app/).
1. Follow the instructions on the tutorial [Create an App](https://aps.autodesk.com/en/docs/oauth/v2/tutorials/create-app/).
When specifying details of the app, select "Design Automation API" and "Data Management API".

2. Jot down the *Client ID* and *Client Secret* of the app you created. You will need this in the next step.
2. Note down the *Client ID* and *Client Secret* of the app you created. You will need this in the next step.

## Save Client ID and Client Secret to Postman Environment Variables

Expand All @@ -29,19 +29,19 @@ To set the environment variables:

## Get an Access Token

To get an Access Token, you must send an `authenticate` request to APS. The Postman Collection has a prepopulated authenticate request that you can send.
To get an Access Token, you must send an `authenticate` request to APS. The Postman collection has a pre-populated authenticate request that you can send. To send the request to APS:

To send the authenticate request to APS:
1. On the Postman sidebar, click **Task 1 - Obtain an Access Token > POST Get an Access Token**. The request loads.

1. In the Postman sidebar, click **Task 1 - Obtain an Access Token > POST Get an Access Token**. The request loads.
2. Click the **Pre-request Script** tab. Notice how a script (written in JavaScript) takes the Client ID and Client Secret, concatenates them, converts to a Base64 encoded string, and saves it back to a Postman Collection Variable named `client_auth_keys`.

2. Click the **Body** tab.
![Preview Client Id and Client Secret](../images/task1-preview_environment_variables.png "Preview Client Id and Client Secret")

3. Move your mouse pointer over the values for **client_id** and **client_secret** in the **VALUES** column, and verify that the values you specified as environment variables are displayed.
3. Click the **Headers** tab. Take note of how `client_auth_keys` is used in the request header.

![Preview Client Id and Client Secret](../images/task1-preview_environment_variables.png "Preview Client Id and Client Secret")
4. Click the **Body** tab. Take note of how the required scopes are specified.

4. Click **Send**. This sends the HTTP request to APS. If your request authenticates successfully, you should see a return Status of **200 OK**, and the response will be similar to the following:
5. Click **Send**. The request is sent to APS. If your request authenticates successfully, you should see a response similar to the following:

![Successful authentication](../images/task1-authenticate_successfull.png "Successful authentication")

Expand Down
6 changes: 2 additions & 4 deletions DA43dsMax/instructions/task-2.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@ A *Nickname* lets you map a Client ID to an easy-to-use name that you can use in

**Notes:**

- As long as your app doesn't have any data, you can map the app to a different Nickname. Once you add data to an App, you cannot set a Nickname for it, or change an existing Nickname.

- The only way you can assign a Nickname to an app with data is by first calling `[DELETE] /forgeapps/me`. This deletes all data associated with that app, including the Nickname. At the end of this tutorial, the HTTP request **Clean up HTTP Requests > DEL Delete App Data in Design Automation** calls this endpoint and clears the app of all data.
- Once you add data to an App, you are not allowed to set a nickname for the app. The only way you can assign a nickname to an app with data is by first calling the `[DELETE] /forgeapps/me`. This action deletes all data associated with that app, including any existing nickname. The request **Extras > Delete App Data in Design Automation** in this Postman Collection calls (`[DELETE] /forgeapps/me`) and clears the app of all data.

![Delete App Data](../images/task2-delete_forge_app.png "Delete app")

- If you get stuck while working on this tutorial, you can use **DEL Delete App Data in Design Automation** to clear all data from the app, and restart from Task 1.
- If you get stuck while working on this tutorial, and are unable to proceed, use this request to clear all data from the app, and restart from Task 1.

- Nicknames cannot contain spaces, and must be globally unique. If the nickname is already in use, even by someone else, APS returns a `409 Conflict` error when you try to set the Nickname.

Expand Down
8 changes: 4 additions & 4 deletions DA43dsMax/instructions/task-3.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ An *Activity* is an action that can be executed using the Design Automation API.
![Body tab of Create Activity](../images/task3-create_activity.png "Body tab of Create Activity")

**Notes**
- `id` is the name given to the new Activity.
- `id` is the name given to the new Activity.

- `commandLine` is the command run by this Activity. The variables used on the command line are replaced with actual values before executing the Activity. This mechanism lets you replace the file path(s) you used while testing the command line locally, with file paths that are applicable to Design Automation. For more information see the [documentation on Command lines](https://aps.autodesk.com/en/docs/design-automation/v3/developers_guide/field-guide/#command-lines).

The variables used on the command line are:

- `$(engine.path)` - The full path to the folder containing *3dsmaxbatch.exe*. The variable ``$(engine.path)`` will be replaced by the path to where the engine is installed. The engine is defined in the JSON payload as `"engine": "Autodesk.3dsMax+2020"`. **Do not edit or alter this commandLine in the request body of Activity posts.**
- `$(engine.path)` - The full path to the folder containing *3dsmaxbatch.exe*. The variable ``$(engine.path)`` will be replaced by the path to where the engine is installed. The engine is defined in the JSON payload as `"engine": "Autodesk.3dsMax+2023"`. **Do not edit or alter this commandLine in the request body of Activity posts.**

- ` $(args[InputMaxScene].path)` - Will be replaced by the path to a file specified by a parameter named `InputMaxScene`.

- `$(args[MaxscriptToExecute].path)` - Will be replaced by the path to a file specified by a parameter named `MaxscriptToExecute`.

- `engine` is the Design Automation engine that the Activity must run on (3ds Max 2020 in this case).
- `engine` is the Design Automation engine that the Activity must run on (3ds Max 2023 in this case).

3. Click **Send**. If the request is successful, you should see a screen similar to the following image.

Expand Down
Loading

0 comments on commit 9b8e6c0

Please sign in to comment.