Import files to Fusion 360 Manage

Autodesk Support

Apr 19, 2021


THE CHALLENGE

The promise of PLM is to provide a single source of truth for latest product data. In order to fulfill this promise, Fusion 360 Manage provides standard import capabilities to reuse and combine existing data from various sources. This import feature not only enables an initial import of data, but also to push updates and upload Bill of Materials information easily. However, this solution is dealing with metadata only. It is not able to upload files that belong to the given data (e.g. into the Attachments tab). 

 

THE SOLUTION

Fusion 360 Manage provides powerful REST APIs that enable to import data  - both metadata and files. Usually, these APIs are used to establish interfaces to external systems, but they can also used for automations. The Technical Sales Specialists team of Autodesk created an automation based on these APIs to easily upload plenty of files in batch. It can also be executed repeatedly to update existing files. Continue reading to learn how you can reuse this utility for your projects.

Please not that this solution is provided as is and there should be no assumption that updates, patches, bug fixes and / or new features will be delivered to you. There will also be no support available either through Autodesk Support channels or by the Autodesk Pre-sales Technical Team. Please feel free to take the source code and ideas from this tool to develop your own production ready tool.

 

HOW DOES IT WORK?

This solution manages the file upload, not the item creation. It assumes that the given records have been created before (e.g. by the standard import functionality). Once you launch this program, it will parse a given folder for files and try to match these files to records managed in PLM. If a match is found, the file will be uploaded to the item's attachments. If the given file already exists in PLM, the given file may be uploaded as new version. Once the file got processed, it will be moved to a defined folder and the next file will be processed. All these actions are logged in the prompt and in log files.

The match of files is based on the filename and a chosen property on the item records - enabling to match the filenames by a number field, a title field or any other.

 

WHAT SOFTWARE IS NEEDED?

The only software to install is node.js - which is available for any platform for free at https://nodejs.org/en/download. Simply download and install it with default settings.

The file upload utility can be downloaded at http://dickmans.de/assets/import-files.zip. Download the zip and extract its contents (e.g. to c:\temp). Finally, open a Command Prompt, navigate to this directory (c:\temp\import-files) and let node.js install required modules by running this command.

npm install

 

HOW TO ENABLE THIS UTILITY?

In order to enable access to your teannt for this utility, you have to create and authorize a Forge app first (if you did not create a Forge app for other purposes before):

  1. Log in at forge.autodesk.com with your Autodesk Account
  2. Click on Create App


     

  3. In the list of APIs being shown select at least one entry (it does not matter which one you select). No worries, this solution does not consume any cloud credits.
  4. Provide a useful App Name and App description


     

Once you created the app, you will see its security details( Client ID + Client Secret). Keep these details open, you will need them for the next steps. Copy the Client ID to the clipboard.

Next, you have to authorize this Forge App in your PLM tenant:

  1. Login to your tenant with an account that has administration permissions
  2. In the menu at top left corner click Administration | System Configuration. Then select General Settings.
  3. Paste the Client ID of your Forge App into the Whitelist in section Security Settings and click Save


     

 

CONFIGURATION

Before this utility can be run, you have to configure the connection to your tenant in file connection.js:

  • clientId : Enter the Client ID of your Forge App
  • clientSecret : Provide the Client Secret of your Forge App
  • tenant : Defines the name of your tenant (without autodeskplm360.net suffix)
  • user : User account to be used for the import (this user must have permisson to access the records in PLM and to upload  files)

Finally, you have to set the options for the import in file options.js:

pathFilesPath to the folder containing the files to be importedc:\temp\files
pathSuccessAll files that were uploaded successfully will be moved from pathFiles to this folder. The folder will be created automatically if it does not exist.c:\temp\files\success
pathFailureAll files that could not be uploaded successfully will be moved from pathFiles to this folder. The folder will be created automatically if it does not exist.c:\temp\files\failure
workspaceIdThe ID of the workspace that holds the records to which the files will be uploaded57
fieldIdThe ID of the field which is used to identify the matching files. NUMBER
includeSuffix

Determines if the file's suffix will be used for the match:

  • none: part.ipt.dwf will be matched to 'part'
  • first : part.ipt.dwf will be matched to 'part.ipt'
  • all: part.ipt.dwf will be matched to 'part.ipt.dwf'
none
attachmentsFolderNameYou can optionally define a folder that will be created in the Attachments tab before uploading the files (leave blank if you do not want to use folders) 
searchModeIf the workspace to be used is revision controlled, select to which records the files should be uploaded (Latest, Working or All)Latest
errorOnMultipleResultsSelect if a file should be considered as failed if multiple matching records are found. If set to true and multiple records match, the file will not be uploaded at all and be moved to folder defined in pathFailure.false
updateExistingFilesDefines whether if files should be uploaded as new version if a file with the same name exists already. The file upload will be considered a success in any case and the file will be moved to folder set by pathSuccess without any further validationtrue

 

RUN THE IMPORT

Run the import in a Command Prompt from within in the utility's folder like this:

node import



Was this information helpful?


Need help? Ask the Autodesk Assistant!

The Assistant can help you find answers or contact an agent.


What level of support do you have?

Different subscription plans provide distinct categories of support. Find out the level of support for your plan.

View levels of support