Using the Cmdlets

../../_images/flc_console.png

Start the PowerShell environment

In order to get started either open any PowerShell IDE and load the powerFLC Module by calling Import-Module powerFLC or open the powerFLC Console shortcut in the start menu, which already loads the powerFLC module for you.

Connect with Fusion 360 Manage

Before you are able to work with the Fusion 360 Manage tenant in your PowerShell environment you have to make sure that the tenant is configured correctly!

Next retrieve the Client ID and Secret (see Step 3: Note Down Your Client ID and Secret) of your registered powerPLM app from the Forge portal.

Find your tenants name by copying the first part of the URL from your browser, after you sign in to your Fusion 360 Manage Site.
For https://previewcoolorange.autodeskplm360.net/plm/mainDashboard the tenant name would be previewcoolorange.

Now you can authenticate using Connect-FLC and all the previously retrieved information.

$connected = Connect-FLC -Tenant 'your_tenant_name' -ClientId 'your_client_id' -ClientSecret 'your_client_secret' -UserId '[email protected]'

Get multiple items from Fusion 360 Manage

After successfully connecting to the Fusion 360 Manage tenant you can start using the cmdlets to interact with FLC items and workspaces.
To retrieve a collection of specific items from a Fusion 360 Manage workspace you can use the Get-FLCItems cmdlet.

Note

Get-FLCItems has the optional parameter -Filter that allows you to specify a string in the same format as Fusion 360 Manage searches to filter the result.

Get all items from the workspace Products that are in the workflow state Concept and have a field named Number with the exact value 900-00010:

$items = Get-FLCItems -Workspace 'Products' -Filter 'workflowState=Concept AND ITEM_DETAILS:NUMBER="900-00010"'

Update a Field of an Item

One of the previously retrieved Fusion 360 Manage Items can now be picked and updated using the update-flcitem cmdlet.
By navigating to the Workspace Manager in Fusion 360 Manage we can find a Item Details Form that provides us a list of possible Item Details Fields that can be edited.

In following example we edit the value of a simple Text Field with the name ‘Description’ by just extending the value with a suffix.

$itemToUpdate = $items[0]

$itemToUpdate| Update-FLCItem -Properties @{'Description'= "$($itemToUpdate.Description) - Edited"}

After executing the Cmdlet, it will return an Item with the updated ‘Description’ Field.